瀏覽代碼

优化代码

reghao 3 年之前
父節點
當前提交
3d877dafd1
共有 3 個文件被更改,包括 7 次插入4 次删除
  1. 2 0
      .gitignore
  2. 2 2
      src/components/player/player.vue
  3. 3 2
      src/views/studio/upload.vue

+ 2 - 0
.gitignore

@@ -2,3 +2,5 @@
 node_modules/
 
 .idea/
+
+dist/

+ 2 - 2
src/components/player/player.vue

@@ -63,7 +63,7 @@
 
 <script>
 import { videoUrl, submitPlayRecord } from '@/api/media/video'
-import SocketInstance from '@/utils/ws/socket-instance'
+// import SocketInstance from '@/utils/ws/socket-instance'
 
 const hls = require('hls.js')
 const dashjs = require('dashjs')
@@ -119,7 +119,7 @@ export default {
     }
   },
   mounted() {
-    //SocketInstance.connect()
+    // SocketInstance.connect()
     const videoId = this.videoProp.videoId
     if (this.getUrl) {
       this.getVideoUrl(videoId)

+ 3 - 2
src/views/studio/upload.vue

@@ -30,6 +30,7 @@
             </uploader>
           </div>
         </v-row>
+        <v-divider />
         <v-row justify="center">
           <v-col cols="10">
             <h2>基本信息</h2>
@@ -45,7 +46,7 @@
             <v-file-input
               :rules="rules"
               accept="image/png, image/jpeg, image/bmp"
-              prepend-icon="mdi-camera"
+              prepend-icon="mdi-image"
               placeholder="上传视频封面"
               label="封面"
               @change="setFile"
@@ -149,7 +150,7 @@ export default {
     return {
       options: {
         target: '//file.reghao.cn' + '/api/file/upload/video',
-        chunkSize: 1024 * 1024 * 20,
+        chunkSize: 1024 * 1024 * 1024 * 5, // 分片大小 5GiB
         forceChunkSize: true,
         fileParameterName: 'file',
         maxChunkRetries: 3,