|
|
@ -20,8 +20,10 @@ |
|
|
|
:src="videoUrl1" |
|
|
|
style="width: 100%; height: 100%; margin-top: -12px;" |
|
|
|
:controls="true" |
|
|
|
ref="videoPlayer" |
|
|
|
autoplay |
|
|
|
id="myVideo" |
|
|
|
@ended="onVideoEnded" |
|
|
|
@play="handelVideoPlay" |
|
|
|
@pause="handelVideoPause" |
|
|
|
></video> |
|
|
@ -253,6 +255,9 @@ export default { |
|
|
|
clearInterval(this.intervalId) // 清除定时器,防止内存泄漏 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onVideoEnded () { |
|
|
|
this.$refs.videoPlayer.play() |
|
|
|
}, |
|
|
|
handelVideoPlay () { |
|
|
|
this.videoStatus = 'play' |
|
|
|
}, |
|
|
|