Sfoglia il codice sorgente

视频缺失检查

liqk 3 anni fa
parent
commit
d660fbe6a9
1 ha cambiato i file con 12 aggiunte e 2 eliminazioni
  1. 12 2
      TEAMModelOS/ClientApp/src/common/VideoPlayer2.vue

+ 12 - 2
TEAMModelOS/ClientApp/src/common/VideoPlayer2.vue

@@ -30,9 +30,19 @@ export default {
         }
     },
     mounted() {
+        let that = this
         this.player = videojs(
             this.$refs.videoPlayer,
-            this.options
+            this.options,
+            function () {
+                this.on('error', (e) => {
+                    that.player.errorDisplay.close();   //将错误信息不显示
+                    that.noVideo = true
+                    // 自定义显示方式
+                    // that.player.getChild("cloumn").addClass("noShow")
+                    that.$emit('on-vd-error')
+                })
+            }
         )
         //时间切片
         let _this = this
@@ -125,7 +135,7 @@ export default {
 <style lang="less" scoped>
 </style>
 <style lang="less">
-.video-wrap .video-js{
+.video-wrap .video-js {
     border: 1px solid #c0c0c0;
 }
 .video-wrap .video-js .vjs-progress-control {