Explorar el Código

1、视频检测时间取时间

liyanbo hace 9 meses
padre
commit
c27f88b53b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/views/AIDevelop.vue

+ 2 - 2
src/views/AIDevelop.vue

@@ -690,10 +690,10 @@ const saveProgress = throttle(async (progress, currentTime) => {
 }, THROTTLE_TIME)
 
 // 处理视频时间更新事件
-const handleTimeUpdate = () => {
+const handleTimeUpdate = (ev) => {
   // 测试账号禁用视频
   if (!videoRef.value) return
-  const currentTime = parseInt(videoRef.value.currentTime)
+  const currentTime = parseInt(ev.target.currentTime)
   const duration = videoRef.value.duration || 0
   const progressPercentage = duration > 0 ? Math.round((currentTime / duration) * 100) : 0
     // 更新最后播放进度