Fix:2959 【商城小程序】先播放古镇活动版块视频,再播放主图视频,活动版块视频不会暂停
This commit is contained in:
@@ -108,6 +108,12 @@ export default {
|
||||
playerCtx.pause()
|
||||
})
|
||||
},
|
||||
handlePlayer() {
|
||||
this.videoPlayers.forEach(player => {
|
||||
const playerCtx = uni.createVideoContext(player, this)
|
||||
playerCtx.pause()
|
||||
})
|
||||
},
|
||||
infoItemViewClick(item, index) {
|
||||
if(item.contentType === 2) {
|
||||
// const coverCtx = uni.createVideoContext('coverVideo', this)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
autoplay
|
||||
play-btn-position="center"
|
||||
:show-fullscreen-btn="false"
|
||||
@play="handlePlay"
|
||||
> </video>
|
||||
</view>
|
||||
<view class="top-intro">
|
||||
@@ -39,7 +40,7 @@
|
||||
<culture :list="townInfo.cultureInfo.cultureImages"></culture>
|
||||
</view>
|
||||
<view v-if="actived === 3">
|
||||
<information :infoArray="activeties" @video="handleVideo"></information>
|
||||
<information ref="information" :infoArray="activeties" @video="handleVideo"></information>
|
||||
</view>
|
||||
<view v-if="actived === 4">
|
||||
<service :info="{...townInfo.serviceInfo, name: townInfo.name}"></service>
|
||||
@@ -114,6 +115,9 @@ export default {
|
||||
this.getActive()
|
||||
},
|
||||
methods: {
|
||||
handlePlay() {
|
||||
this.$refs.information.handlePlayer()
|
||||
},
|
||||
handleVideo() {
|
||||
const videoCtx = uni.createVideoContext('videoCover', this)
|
||||
videoCtx.pause()
|
||||
|
||||
Reference in New Issue
Block a user