Fix:2903 【商城小程序】农民店铺、村屋租售,寻趣味店铺,视频资讯播放中再点击视频封面播放,两者会出现同时播放情况
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
play-btn-position="center"
|
||||
id="coverVideo"
|
||||
class="video"
|
||||
@play="coverPlay"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -443,6 +444,12 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
coverPlay(){
|
||||
this.videoPlayers.forEach(player => {
|
||||
const playerCtx = uni.createVideoContext(player, this)
|
||||
playerCtx.pause()
|
||||
})
|
||||
},
|
||||
infoItemViewClick(item, index) {
|
||||
if(item.type === 2) {
|
||||
const coverCtx = uni.createVideoContext('coverVideo', this)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
object-fit="contain"
|
||||
play-btn-position="center"
|
||||
class="video"
|
||||
@play="coverPlay"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -668,6 +669,12 @@ export default {
|
||||
infoClick: function (info) {
|
||||
// this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
|
||||
},
|
||||
coverPlay(){
|
||||
this.videoPlayers.forEach(player => {
|
||||
const playerCtx = uni.createVideoContext(player, this)
|
||||
playerCtx.pause()
|
||||
})
|
||||
},
|
||||
infoItemViewClick(item, index) {
|
||||
if(item.type === 'NT_VIDEO') {
|
||||
const coverCtx = uni.createVideoContext('coverVideo', this)
|
||||
|
||||
Reference in New Issue
Block a user