diff --git a/pkg_product/views/experienceProjectDetail.vue b/pkg_product/views/experienceProjectDetail.vue index c820234..5751ebb 100644 --- a/pkg_product/views/experienceProjectDetail.vue +++ b/pkg_product/views/experienceProjectDetail.vue @@ -10,9 +10,9 @@ /> - + - + @@ -167,6 +167,8 @@ export default { usageNotice: '', currentSwiperIndex: 0, videoContext: null, + swiperAutoplay: true, + isVideoPlaying: false, projectList: [] } }, @@ -226,6 +228,23 @@ export default { } } }, + onVideoPlay() { + this.swiperAutoplay = false + this.isVideoPlaying = true + }, + onVideoEnd() { + this.swiperAutoplay = true + this.isVideoPlaying = false + }, + toggleVideo() { + if (!this.videoContext) return + if (this.isVideoPlaying) { + this.videoContext.pause() + this.swiperAutoplay = true + } else { + this.videoContext.play() + } + }, fetchProjectDetail() { if (!this.experienceMerchantId) { return