|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="ezy-video-box course-video-box">
|
|
|
- <view ref="videoContent" id="video-play1" :playAuth="playAuth1"
|
|
|
+ <view ref="videoContent" id="video-play1" :playAuth="playAuth1" :count="count" :change:count="renderScript.stopPlayer"
|
|
|
:change:playAuth="renderScript.receiveMsg" :videoId="videoId1" :change:videoId="renderScript.videoIdFun"
|
|
|
:hideFlag="hideFlag1" :change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers1"
|
|
|
:change:progressMarkers="renderScript.progressMarkersMsg" :seekTime="seekTime1"
|
|
|
@@ -35,11 +35,13 @@
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
- return {}
|
|
|
+ return {
|
|
|
+ count: 0
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
handleStop() {
|
|
|
- MyRenderEventBus.$emit('video-play1')
|
|
|
+ this.count++;
|
|
|
},
|
|
|
playEnd() {
|
|
|
this.$emit('playEnd')
|
|
|
@@ -49,14 +51,7 @@
|
|
|
</script>
|
|
|
|
|
|
<script module="renderScript" lang="renderjs">
|
|
|
- import {MyRenderEventBus} from "./renderEvents";
|
|
|
export default {
|
|
|
- mounted() {
|
|
|
- MyRenderEventBus.$on(`video-play1`, this.stopPlayer)
|
|
|
- },
|
|
|
- Unmounted() {
|
|
|
- MyRenderEventBus.$ff(`video-play1`, this.stopPlayer)
|
|
|
- },
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
@@ -70,6 +65,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
stopPlayer() {
|
|
|
+ console.log('暂停stopPlayer1')
|
|
|
this.player && this.player.pause();
|
|
|
},
|
|
|
receiveMsg(newValue, oldValue, ownerInstance, instance) {
|