瀏覽代碼

视频播放再优化

zhangjie 2 年之前
父節點
當前提交
31ef6a9931

+ 14 - 0
src/features/invigilation/RealtimeMonitoring/WarningDetail.vue

@@ -35,6 +35,20 @@
             <span>科目(代码):</span
             ><span>{{ detailInfo.courseNameCode }}</span>
           </p>
+          <p>
+            <span>考试时间:</span
+            ><span
+              >{{ detailInfo.examActivityStartTime | datetimeFilter }}~{{
+                detailInfo.examActivityEndTime | datetimeFilter
+              }}</span
+            >
+          </p>
+          <p>
+            <span>考场:</span><span>{{ detailInfo.roomName }}</span>
+          </p>
+          <p>
+            <span>监考员:</span><span>{{ detailInfo.invigilateUsers }}</span>
+          </p>
         </div>
         <div class="detail-body-head-right">
           <el-button

+ 8 - 4
src/features/invigilation/common/FlvMedia.vue

@@ -94,7 +94,8 @@ export default {
         },
         {
           fixAudioTimestampGap: false,
-          autoCleanupSourceBuffer: true,
+          enableStashBuffer: true,
+          stashInitialSize: false,
         }
       );
       this.flvPlayer.attachMediaElement(this.$refs.VideoMedia);
@@ -116,12 +117,15 @@ export default {
         this.lastDecodedFrames = res.decodedFrames;
         return;
       }
-      if (this.lastDecodedFrames !== res.decodedFrames) {
-        this.lastDecodedFrames = res.decodedFrames;
-      } else {
+      if (
+        this.lastDecodedFrames === res.decodedFrames &&
+        !this.flvPlayer.paused
+      ) {
         this.lastDecodedFrames = 0;
         console.log("卡住了,准备重试!");
         this.retryPlay();
+      } else {
+        this.lastDecodedFrames = res.decodedFrames;
       }
     },
     playError(errorType) {

+ 4 - 0
src/styles/base.scss

@@ -397,6 +397,10 @@ body {
     }
 
     &-right {
+      width: 100px;
+      flex-grow: 0;
+      flex-shrink: 0;
+      text-align: right;
       .el-button {
         padding: 0;
         width: 32px;