skyblued 2 years ago
parent
commit
27ffa0c5d2
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/views/coursewarePlay/index.tsx

+ 4 - 1
src/views/coursewarePlay/index.tsx

@@ -300,7 +300,10 @@ export default defineComponent({
           closeToast()
           item.currentTime = 0
           item.videoEle && (item.videoEle.currentTime = 0)
-          item.autoPlay = true
+          nextTick(() => {
+            item.autoPlay = true
+            item.videoEle?.play()
+          })
         }
       }
     }