Browse Source

修改请求

lex 9 months ago
parent
commit
cc2a5a784c
4 changed files with 17 additions and 15 deletions
  1. 1 1
      dev-dist/sw.js
  2. 1 1
      public/version.json
  3. 13 11
      src/views/attend-class/component/video-play.tsx
  4. 2 2
      vite.config.ts

+ 1 - 1
dev-dist/sw.js

@@ -82,7 +82,7 @@ define(['./workbox-bb0550c6'], (function (workbox) { 'use strict';
     "revision": "3ca0b8505b4bec776b69afdba2768812"
   }, {
     "url": "index.html",
-    "revision": "0.j393v0ojv18"
+    "revision": "0.te9il07ke8o"
   }], {});
   workbox.cleanupOutdatedCaches();
   workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1717135738009}
+{"version":1717401681157}

+ 13 - 11
src/views/attend-class/component/video-play.tsx

@@ -346,17 +346,17 @@ export default defineComponent({
         //   }
 
         // }
-        console.log(
-          uncachedTime,
-          duration,
-          cachedDuration,
-          'duration',
-          buffterCatchArray,
-          element.currentTime,
-          currentLength + '%',
-          isWaiting,
-          currentBytesLoaded <= previousBytesLoaded
-        );
+        // console.log(
+        //   uncachedTime,
+        //   duration,
+        //   cachedDuration,
+        //   'duration',
+        //   buffterCatchArray,
+        //   element.currentTime,
+        //   currentLength + '%',
+        //   isWaiting,
+        //   currentBytesLoaded <= previousBytesLoaded
+        // );
 
         const isNoBuffer = currentBytesLoaded <= previousBytesLoaded;
         // 如果存在未缓存的时间段,可以根据具体情况做出相应处理
@@ -485,6 +485,7 @@ export default defineComponent({
         const currentTime = videoItem.value.currentTime();
         videoItem.value.load();
         videoItem.value.currentTime(currentTime);
+        pause();
       } else if (val.type === 'offline') {
         videoFroms.isOnline = false;
       }
@@ -511,6 +512,7 @@ export default defineComponent({
 
     const pause = () => {
       videoItem.value.pause();
+      videoFroms.paused = true;
     };
 
     onUnmounted(() => {

+ 2 - 2
vite.config.ts

@@ -23,8 +23,8 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://dev.kt.colexiu.com/';
-// const proxyUrl = 'https://test.kt.colexiu.com';
+// const proxyUrl = 'https://dev.kt.colexiu.com/';
+const proxyUrl = 'https://test.kt.colexiu.com';
 // const proxyUrl = 'http://192.168.3.14:7989';
 const now = new Date().getTime();
 export default defineConfig(() => {