lex-xin il y a 1 semaine
Parent
commit
09c14563ed

+ 3 - 3
src/views/courseware-play/component/audio-item/index.tsx

@@ -184,7 +184,7 @@ export default defineComponent({
       data.timer = setTimeout(() => {
         audioRef.value.currentTime = val;
         data.timer = null;
-      }, 60);
+      }, 300);
     };
 
     /** 播放结束 */
@@ -495,7 +495,7 @@ export default defineComponent({
                   onInit(audioRef.value, canvasRef.value);
                 }
                 // 开始拖动时也不能更新
-                if (data.dragStatus) return;
+                if (data.timer) return;
                 data.currentTime = audioRef.value?.currentTime;
               }}
               onError={() => {
@@ -539,7 +539,7 @@ export default defineComponent({
             <Slider
               step={0.01}
               class={styles.timeProgress}
-              v-model={data.currentTime}
+              modelValue={data.currentTime}
               max={data.duration}
               onUpdate:modelValue={val => {
                 handleChangeTime(val);

+ 3 - 0
src/views/courseware-play/component/video-item/index.tsx

@@ -499,6 +499,9 @@ export default defineComponent({
     const onChangeOnlineStatus = (val: any) => {
       if (val.type === 'online') {
         data.isOnline = true;
+        const currentTime = videoItem.value.currentTime();
+        videoItem.value.load();
+        videoItem.value.currentTime(currentTime);
       } else if (val.type === 'offline') {
         data.isOnline = false;
       }