diff --git a/src/views/jlmap3d/passflow/jl3dpassflow.vue b/src/views/jlmap3d/passflow/jl3dpassflow.vue index 95ca83e3f..3754039f7 100644 --- a/src/views/jlmap3d/passflow/jl3dpassflow.vue +++ b/src/views/jlmap3d/passflow/jl3dpassflow.vue @@ -133,22 +133,24 @@ export default { }); this.on('error', function() { console.log('error'); - const src = video.getMedia().src[0].src; - video.reset(); - video.src(src); - video.load(); - video.play(); - var currentTime = video.currentTime(); - lastTime = currentTime; + if (video.error().code == '') { + const src = video.getMedia().src[0].src; + video.reset(); + video.src(src); + video.load(); + video.play(); + var currentTime = video.currentTime(); + lastTime = currentTime; + } }); this.on('seeked', function() { // 已经拿到视频流,可以播放 console.log('seeked'); - var currentTime = video.currentTime(); - if (currentTime == lastTime) { - video.currentTime(currentTime + 10000); - video.play(); - } + // var currentTime = video.currentTime(); + // if (currentTime != lastTime) { + // // video.currentTime(currentTime + 10000); + // video.play(); + // } // video.play(); }); this.on('loadedmetadata', function() { diff --git a/src/views/newMap/jointTrainingNew/realCCTV.vue b/src/views/newMap/jointTrainingNew/realCCTV.vue index d91a1fc2c..5de8da288 100644 --- a/src/views/newMap/jointTrainingNew/realCCTV.vue +++ b/src/views/newMap/jointTrainingNew/realCCTV.vue @@ -59,21 +59,23 @@ export default { this.on('seeked', function() { // 已经拿到视频流,可以播放 console.log('seeked'); - var currentTime = video.currentTime(); - if (currentTime == lastTime) { - video.currentTime(currentTime + 10000); - video.play(); - } + // var currentTime = video.currentTime(); + // if (currentTime != lastTime) { + // video.currentTime(currentTime + 10000); + // video.play(); + // } }); this.on('error', function() { console.log('error'); - const src = video.getMedia().src[0].src; - video.reset(); - video.src(src); - video.load(); - video.play(); - var currentTime = video.currentTime(); - lastTime = currentTime; + if (video.error().code == '') { + const src = video.getMedia().src[0].src; + video.reset(); + video.src(src); + video.load(); + video.play(); + var currentTime = video.currentTime(); + lastTime = currentTime; + } }); this.on('loadedmetadata', function() { console.log('loadedmetadata');