|
|
@@ -5,7 +5,8 @@
|
|
|
<div class="v-wrap-marks"></div>
|
|
|
<video-player id="myVideo" class="video-player-box" ref="videoPlayer" :playsinline="true"
|
|
|
@pause="onPlayerPause($event)" @timeupdate="onPlayerTimeupdate($event)" @play="onPlayerStart($event)"
|
|
|
- @ready="playerReadied" @ended="onPlayerEnded($event)" :globalOptions="{controls:true}" :options="options">
|
|
|
+ @ready="playerReadied" @ended="onPlayerEnded($event)" @error="onPlayerError($event)"
|
|
|
+ :globalOptions="{controls:true}" :options="options">
|
|
|
</video-player>
|
|
|
<div class="dialog-footer pt30">
|
|
|
<el-row class="media-footer">
|
|
|
@@ -171,7 +172,7 @@
|
|
|
let that = this;
|
|
|
|
|
|
if (this.media.position > 5 && this.media.position < this.media.duration) {
|
|
|
- this.setposition(this.media.position+3)
|
|
|
+ this.setposition(this.media.position)
|
|
|
}
|
|
|
this.isReady = true
|
|
|
setTimeout(() => this.setMarks(), 600);
|
|
|
@@ -207,6 +208,16 @@
|
|
|
this.stopTick()
|
|
|
this.onPlay = false
|
|
|
},
|
|
|
+ onPlayerError(event) {
|
|
|
+ this.reportErr("play", 'error');
|
|
|
+ let player = this.$refs.videoPlayer && this.$refs.videoPlayer.player;
|
|
|
+ if (player) {
|
|
|
+ player.pause();
|
|
|
+ setTimeout(() => {
|
|
|
+ player.play();
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ },
|
|
|
onPlayerEnded(event) {
|
|
|
this.reportErr("play", 'end');
|
|
|
this.tick(true)
|