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