lex-xin 3 ヶ月 前
コミット
d6f7a57c75

+ 1 - 2
src/views/attend-class/component/audio-pay.tsx

@@ -517,9 +517,8 @@ export default defineComponent({
                 clearTimeout(audioForms.bufferTimeout);
 
               // 设置缓冲超时检测(15秒)
-              if (!audioForms.isOnline) return;
               audioForms.bufferTimeout = setTimeout(() => {
-                if (audioForms.isBuffering) {
+                if (audioForms.isBuffering && audioForms.isOnline) {
                   console.log('缓冲超时,暂停播放');
                   audio.value?.pause();
                   audioForms.paused = true;

+ 1 - 2
src/views/attend-class/component/video-play.tsx

@@ -206,9 +206,8 @@ export default defineComponent({
           videoFroms.bufferTimeout && clearTimeout(videoFroms.bufferTimeout);
 
           // 设置缓冲超时检测(15秒)
-          if (!videoFroms.isOnline) return;
           videoFroms.bufferTimeout = setTimeout(() => {
-            if (videoFroms.isBuffering) {
+            if (videoFroms.isBuffering && videoFroms.isOnline) {
               console.log('缓冲超时,暂停播放');
               videoItem.value.pause();
               videoFroms.paused = true;