Fix:2903 【商城小程序】农民店铺、村屋租售,寻趣味店铺,视频资讯播放中再点击视频封面播放,两者会出现同时播放情况
This commit is contained in:
@@ -102,6 +102,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
coverPlay(){
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
play-btn-position="center"
|
||||
class="video"
|
||||
id="coverVideo"
|
||||
@play="coverPlay"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1064,6 +1065,12 @@ export default {
|
||||
infoClick(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 === 2) {
|
||||
const coverCtx = uni.createVideoContext('coverVideo', this)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
play-btn-position="center"
|
||||
class="video"
|
||||
id="coverVideo"
|
||||
@play="coverPlay"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -256,6 +257,12 @@ export default {
|
||||
this.getInfoReq()
|
||||
},
|
||||
methods: {
|
||||
coverPlay(){
|
||||
this.videoPlayers.forEach(player => {
|
||||
const playerCtx = uni.createVideoContext(player, this)
|
||||
playerCtx.pause()
|
||||
})
|
||||
},
|
||||
handleVideo(item, index) {
|
||||
if(item.type === 2) {
|
||||
const coverCtx = uni.createVideoContext('coverVideo', this)
|
||||
|
||||
Reference in New Issue
Block a user