浏览代码

循环播放,抖动

liushengqiang 1 年之前
父节点
当前提交
4d89e6f1f9
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/views/courseware-play/component/video-item/index.tsx

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

@@ -208,12 +208,9 @@ export default defineComponent({
           class={[styles.controls, props.showModel ? '' : styles.hide]}
           onClick={(e: Event) => {
             e.stopPropagation();
-            if(videoItem.value.paused()) return
-            emit('close');
           }}
           onTouchmove={(e: TouchEvent) => {
-            if(videoItem.value.paused()) return
-            emit('close');
+            e.stopPropagation();
           }}>
           <div class={styles.time}>
             <div>{getSecondRPM(data.currentTime)}</div>
@@ -239,7 +236,10 @@ export default defineComponent({
             </div>
             <div
               class={styles.actionBtn}
-              onClick={() => (data.loop = !data.loop)}>
+              onClick={() => {
+                data.loop = !data.loop
+                videoItem.value.loop(data.loop)
+              }}>
               <img src={data.loop ? iconLoopActive : iconLoop} />
             </div>
           </div>