zy1125 1 год назад
Родитель
Сommit
699109658c
6 измененных файлов с 733 добавлено и 103 удалено
  1. 508 7
      package-lock.json
  2. 3 0
      package.json
  3. 2 1
      public/config.js
  4. 96 0
      src/components/VideoJs.vue
  5. 121 95
      src/components/right.vue
  6. 3 0
      src/main.js

+ 508 - 7
package-lock.json

@@ -15,6 +15,14 @@
15 15
       "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.18.5.tgz",
16 16
       "integrity": "sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw=="
17 17
     },
18
+    "@babel/runtime": {
19
+      "version": "7.23.5",
20
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz",
21
+      "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==",
22
+      "requires": {
23
+        "regenerator-runtime": "^0.14.0"
24
+      }
25
+    },
18 26
     "@ctrl/tinycolor": {
19 27
       "version": "3.6.0",
20 28
       "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.0.tgz",
@@ -79,6 +87,11 @@
79 87
         "fastq": "^1.6.0"
80 88
       }
81 89
     },
90
+    "@popperjs/core": {
91
+      "version": "npm:@sxzz/popperjs-es@2.11.7",
92
+      "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
93
+      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
94
+    },
82 95
     "@rollup/pluginutils": {
83 96
       "version": "5.0.2",
84 97
       "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
@@ -114,6 +127,74 @@
114 127
       "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
115 128
       "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
116 129
     },
130
+    "@videojs/http-streaming": {
131
+      "version": "3.7.0",
132
+      "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-3.7.0.tgz",
133
+      "integrity": "sha512-5uLFKBL8CvD56dxxJyuxqB5CY0tdoa4SE9KbXakeiAy6iFBUEPvTr2YGLKEWvQ8Lojs1wl+FQndLdv+GO7t9Fw==",
134
+      "requires": {
135
+        "@babel/runtime": "^7.12.5",
136
+        "@videojs/vhs-utils": "4.0.0",
137
+        "aes-decrypter": "4.0.1",
138
+        "global": "^4.4.0",
139
+        "m3u8-parser": "^7.1.0",
140
+        "mpd-parser": "^1.2.2",
141
+        "mux.js": "7.0.1",
142
+        "video.js": "^7 || ^8"
143
+      },
144
+      "dependencies": {
145
+        "m3u8-parser": {
146
+          "version": "7.1.0",
147
+          "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-7.1.0.tgz",
148
+          "integrity": "sha512-7N+pk79EH4oLKPEYdgRXgAsKDyA/VCo0qCHlUwacttQA0WqsjZQYmNfywMvjlY9MpEBVZEt0jKFd73Kv15EBYQ==",
149
+          "requires": {
150
+            "@babel/runtime": "^7.12.5",
151
+            "@videojs/vhs-utils": "^3.0.5",
152
+            "global": "^4.4.0"
153
+          },
154
+          "dependencies": {
155
+            "@videojs/vhs-utils": {
156
+              "version": "3.0.5",
157
+              "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
158
+              "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==",
159
+              "requires": {
160
+                "@babel/runtime": "^7.12.5",
161
+                "global": "^4.4.0",
162
+                "url-toolkit": "^2.2.1"
163
+              }
164
+            }
165
+          }
166
+        },
167
+        "mux.js": {
168
+          "version": "7.0.1",
169
+          "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-7.0.1.tgz",
170
+          "integrity": "sha512-Omz79uHqYpMP1V80JlvEdCiOW1hiw4mBvDh9gaZEpxvB+7WYb2soZSzfuSRrK2Kh9Pm6eugQNrIpY/Bnyhk4hw==",
171
+          "requires": {
172
+            "@babel/runtime": "^7.11.2",
173
+            "global": "^4.4.0"
174
+          }
175
+        }
176
+      }
177
+    },
178
+    "@videojs/vhs-utils": {
179
+      "version": "4.0.0",
180
+      "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz",
181
+      "integrity": "sha512-xJp7Yd4jMLwje2vHCUmi8MOUU76nxiwII3z4Eg3Ucb+6rrkFVGosrXlMgGnaLjq724j3wzNElRZ71D/CKrTtxg==",
182
+      "requires": {
183
+        "@babel/runtime": "^7.12.5",
184
+        "global": "^4.4.0",
185
+        "url-toolkit": "^2.2.1"
186
+      }
187
+    },
188
+    "@videojs/xhr": {
189
+      "version": "2.6.0",
190
+      "resolved": "https://registry.npmjs.org/@videojs/xhr/-/xhr-2.6.0.tgz",
191
+      "integrity": "sha512-7J361GiN1tXpm+gd0xz2QWr3xNWBE+rytvo8J3KuggFaLg+U37gZQ2BuPLcnkfGffy2e+ozY70RHC8jt7zjA6Q==",
192
+      "requires": {
193
+        "@babel/runtime": "^7.5.5",
194
+        "global": "~4.4.0",
195
+        "is-function": "^1.0.1"
196
+      }
197
+    },
117 198
     "@vitejs/plugin-vue": {
118 199
       "version": "2.3.3",
119 200
       "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-2.3.3.tgz",
@@ -248,12 +329,40 @@
248 329
         "vue-demi": "*"
249 330
       }
250 331
     },
332
+    "@xmldom/xmldom": {
333
+      "version": "0.8.10",
334
+      "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
335
+      "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="
336
+    },
251 337
     "acorn": {
252 338
       "version": "8.10.0",
253 339
       "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz",
254 340
       "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
255 341
       "dev": true
256 342
     },
343
+    "aes-decrypter": {
344
+      "version": "4.0.1",
345
+      "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-4.0.1.tgz",
346
+      "integrity": "sha512-H1nh/P9VZXUf17AA5NQfJML88CFjVBDuGkp5zDHa7oEhYN9TTpNLJknRY1ie0iSKWlDf6JRnJKaZVDSQdPy6Cg==",
347
+      "requires": {
348
+        "@babel/runtime": "^7.12.5",
349
+        "@videojs/vhs-utils": "^3.0.5",
350
+        "global": "^4.4.0",
351
+        "pkcs7": "^1.0.4"
352
+      },
353
+      "dependencies": {
354
+        "@videojs/vhs-utils": {
355
+          "version": "3.0.5",
356
+          "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
357
+          "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==",
358
+          "requires": {
359
+            "@babel/runtime": "^7.12.5",
360
+            "global": "^4.4.0",
361
+            "url-toolkit": "^2.2.1"
362
+          }
363
+        }
364
+      }
365
+    },
257 366
     "amfe-flexible": {
258 367
       "version": "2.2.1",
259 368
       "resolved": "https://registry.npmmirror.com/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
@@ -289,6 +398,27 @@
289 398
         "proxy-from-env": "^1.1.0"
290 399
       }
291 400
     },
401
+    "babel-runtime": {
402
+      "version": "6.26.0",
403
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
404
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
405
+      "requires": {
406
+        "core-js": "^2.4.0",
407
+        "regenerator-runtime": "^0.11.0"
408
+      },
409
+      "dependencies": {
410
+        "core-js": {
411
+          "version": "2.6.12",
412
+          "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
413
+          "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
414
+        },
415
+        "regenerator-runtime": {
416
+          "version": "0.11.1",
417
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
418
+          "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
419
+        }
420
+      }
421
+    },
292 422
     "balanced-match": {
293 423
       "version": "1.0.2",
294 424
       "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -378,6 +508,11 @@
378 508
       "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
379 509
       "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
380 510
     },
511
+    "dom-walk": {
512
+      "version": "0.1.2",
513
+      "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz",
514
+      "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
515
+    },
381 516
     "echarts": {
382 517
       "version": "5.4.3",
383 518
       "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
@@ -407,13 +542,6 @@
407 542
         "lodash-unified": "^1.0.2",
408 543
         "memoize-one": "^6.0.0",
409 544
         "normalize-wheel-es": "^1.2.0"
410
-      },
411
-      "dependencies": {
412
-        "@popperjs/core": {
413
-          "version": "npm:@sxzz/popperjs-es@2.11.7",
414
-          "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
415
-          "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
416
-        }
417 545
       }
418 546
     },
419 547
     "emojis-list": {
@@ -422,6 +550,11 @@
422 550
       "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
423 551
       "dev": true
424 552
     },
553
+    "es5-shim": {
554
+      "version": "4.6.7",
555
+      "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.6.7.tgz",
556
+      "integrity": "sha512-jg21/dmlrNQI7JyyA2w7n+yifSxBng0ZralnSfVZjoCawgNTCnS+yBCyVM9DL5itm7SUnDGgv7hcq2XCZX4iRQ=="
557
+    },
425 558
     "esbuild": {
426 559
       "version": "0.14.47",
427 560
       "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.47.tgz",
@@ -674,6 +807,15 @@
674 807
         "is-glob": "^4.0.1"
675 808
       }
676 809
     },
810
+    "global": {
811
+      "version": "4.4.0",
812
+      "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz",
813
+      "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
814
+      "requires": {
815
+        "min-document": "^2.19.0",
816
+        "process": "^0.11.10"
817
+      }
818
+    },
677 819
     "has": {
678 820
       "version": "1.0.3",
679 821
       "resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz",
@@ -694,6 +836,11 @@
694 836
       "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==",
695 837
       "dev": true
696 838
     },
839
+    "individual": {
840
+      "version": "2.0.0",
841
+      "resolved": "https://registry.npmjs.org/individual/-/individual-2.0.0.tgz",
842
+      "integrity": "sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g=="
843
+    },
697 844
     "is-binary-path": {
698 845
       "version": "2.1.0",
699 846
       "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",
@@ -718,6 +865,11 @@
718 865
       "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
719 866
       "dev": true
720 867
     },
868
+    "is-function": {
869
+      "version": "1.0.2",
870
+      "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz",
871
+      "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
872
+    },
721 873
     "is-glob": {
722 874
       "version": "4.0.3",
723 875
       "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
@@ -748,6 +900,11 @@
748 900
       "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
749 901
       "dev": true
750 902
     },
903
+    "keycode": {
904
+      "version": "2.2.0",
905
+      "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz",
906
+      "integrity": "sha512-ps3I9jAdNtRpJrbBvQjpzyFbss/skHqzS+eu4RxKLaEAtFqkjZaB6TZMSivPbLxf4K7VI4SjR0P5mRCX5+Q25A=="
907
+    },
751 908
     "leader-line": {
752 909
       "version": "1.0.7",
753 910
       "resolved": "https://registry.npmmirror.com/leader-line/-/leader-line-1.0.7.tgz",
@@ -785,6 +942,28 @@
785 942
       "resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
786 943
       "integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ=="
787 944
     },
945
+    "m3u8-parser": {
946
+      "version": "6.2.0",
947
+      "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-6.2.0.tgz",
948
+      "integrity": "sha512-qlC00JTxYOxawcqg+RB8jbyNwL3foY/nCY61kyWP+RCuJE9APLeqB/nSlTjb4Mg0yRmyERgjswpdQxMvkeoDrg==",
949
+      "requires": {
950
+        "@babel/runtime": "^7.12.5",
951
+        "@videojs/vhs-utils": "^3.0.5",
952
+        "global": "^4.4.0"
953
+      },
954
+      "dependencies": {
955
+        "@videojs/vhs-utils": {
956
+          "version": "3.0.5",
957
+          "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
958
+          "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==",
959
+          "requires": {
960
+            "@babel/runtime": "^7.12.5",
961
+            "global": "^4.4.0",
962
+            "url-toolkit": "^2.2.1"
963
+          }
964
+        }
965
+      }
966
+    },
788 967
     "magic-string": {
789 968
       "version": "0.25.9",
790 969
       "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
@@ -827,6 +1006,14 @@
827 1006
         "mime-db": "1.52.0"
828 1007
       }
829 1008
     },
1009
+    "min-document": {
1010
+      "version": "2.19.0",
1011
+      "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz",
1012
+      "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
1013
+      "requires": {
1014
+        "dom-walk": "^0.1.0"
1015
+      }
1016
+    },
830 1017
     "minimatch": {
831 1018
       "version": "9.0.3",
832 1019
       "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.3.tgz",
@@ -854,12 +1041,44 @@
854 1041
         "ufo": "^1.1.2"
855 1042
       }
856 1043
     },
1044
+    "mpd-parser": {
1045
+      "version": "1.2.2",
1046
+      "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-1.2.2.tgz",
1047
+      "integrity": "sha512-QCfB1koOoZw6E5La1cx+W/Yd0EZlRhHMqMr4TAJez0eRTuPDzPM5FWoiOqjyo37W+ISPLzmfJACSbJFEBjbL4Q==",
1048
+      "requires": {
1049
+        "@babel/runtime": "^7.12.5",
1050
+        "@videojs/vhs-utils": "^3.0.5",
1051
+        "@xmldom/xmldom": "^0.8.3",
1052
+        "global": "^4.4.0"
1053
+      },
1054
+      "dependencies": {
1055
+        "@videojs/vhs-utils": {
1056
+          "version": "3.0.5",
1057
+          "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz",
1058
+          "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==",
1059
+          "requires": {
1060
+            "@babel/runtime": "^7.12.5",
1061
+            "global": "^4.4.0",
1062
+            "url-toolkit": "^2.2.1"
1063
+          }
1064
+        }
1065
+      }
1066
+    },
857 1067
     "ms": {
858 1068
       "version": "2.1.2",
859 1069
       "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
860 1070
       "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
861 1071
       "dev": true
862 1072
     },
1073
+    "mux.js": {
1074
+      "version": "7.0.2",
1075
+      "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-7.0.2.tgz",
1076
+      "integrity": "sha512-CM6+QuyDbc0qW1OfEjkd2+jVKzTXF+z5VOKH0eZxtZtnrG/ilkW/U7l7IXGtBNLASF9sKZMcK1u669cq50Qq0A==",
1077
+      "requires": {
1078
+        "@babel/runtime": "^7.11.2",
1079
+        "global": "^4.4.0"
1080
+      }
1081
+    },
863 1082
     "nanoid": {
864 1083
       "version": "3.3.4",
865 1084
       "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz",
@@ -876,6 +1095,11 @@
876 1095
       "resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
877 1096
       "integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
878 1097
     },
1098
+    "parse-headers": {
1099
+      "version": "2.0.5",
1100
+      "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz",
1101
+      "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA=="
1102
+    },
879 1103
     "path-parse": {
880 1104
       "version": "1.0.7",
881 1105
       "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
@@ -899,6 +1123,14 @@
899 1123
       "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
900 1124
       "dev": true
901 1125
     },
1126
+    "pkcs7": {
1127
+      "version": "1.0.4",
1128
+      "resolved": "https://registry.npmjs.org/pkcs7/-/pkcs7-1.0.4.tgz",
1129
+      "integrity": "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ==",
1130
+      "requires": {
1131
+        "@babel/runtime": "^7.5.5"
1132
+      }
1133
+    },
902 1134
     "pkg-types": {
903 1135
       "version": "1.0.3",
904 1136
       "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-1.0.3.tgz",
@@ -925,6 +1157,11 @@
925 1157
       "resolved": "https://registry.npmmirror.com/postcss-pxtorem/-/postcss-pxtorem-6.0.0.tgz",
926 1158
       "integrity": "sha512-ZRXrD7MLLjLk2RNGV6UA4f5Y7gy+a/j1EqjAfp9NdcNYVjUMvg5HTYduTjSkKBkRkfqbg/iKrjMO70V4g1LZeg=="
927 1159
     },
1160
+    "process": {
1161
+      "version": "0.11.10",
1162
+      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
1163
+      "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="
1164
+    },
928 1165
     "proxy-from-env": {
929 1166
       "version": "1.1.0",
930 1167
       "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
@@ -945,6 +1182,11 @@
945 1182
         "picomatch": "^2.2.1"
946 1183
       }
947 1184
     },
1185
+    "regenerator-runtime": {
1186
+      "version": "0.14.0",
1187
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
1188
+      "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
1189
+    },
948 1190
     "resolve": {
949 1191
       "version": "1.22.1",
950 1192
       "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz",
@@ -980,6 +1222,22 @@
980 1222
         "queue-microtask": "^1.2.2"
981 1223
       }
982 1224
     },
1225
+    "rust-result": {
1226
+      "version": "1.0.0",
1227
+      "resolved": "https://registry.npmjs.org/rust-result/-/rust-result-1.0.0.tgz",
1228
+      "integrity": "sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==",
1229
+      "requires": {
1230
+        "individual": "^2.0.0"
1231
+      }
1232
+    },
1233
+    "safe-json-parse": {
1234
+      "version": "4.0.0",
1235
+      "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-4.0.0.tgz",
1236
+      "integrity": "sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==",
1237
+      "requires": {
1238
+        "rust-result": "^1.0.0"
1239
+      }
1240
+    },
983 1241
     "sass": {
984 1242
       "version": "1.64.2",
985 1243
       "resolved": "https://registry.npmmirror.com/sass/-/sass-1.64.2.tgz",
@@ -1055,6 +1313,11 @@
1055 1313
       "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
1056 1314
       "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
1057 1315
     },
1316
+    "tsml": {
1317
+      "version": "1.0.1",
1318
+      "resolved": "https://registry.npmjs.org/tsml/-/tsml-1.0.1.tgz",
1319
+      "integrity": "sha512-3KmepnH9SUsoOVtg013CRrL7c+AK7ECaquAsJdvu4288EDJuraqBlP4PDXT/rLEJ9YDn4jqLAzRJsnFPx+V6lg=="
1320
+    },
1058 1321
     "ufo": {
1059 1322
       "version": "1.2.0",
1060 1323
       "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.2.0.tgz",
@@ -1179,6 +1442,207 @@
1179 1442
         }
1180 1443
       }
1181 1444
     },
1445
+    "url-toolkit": {
1446
+      "version": "2.2.5",
1447
+      "resolved": "https://registry.npmjs.org/url-toolkit/-/url-toolkit-2.2.5.tgz",
1448
+      "integrity": "sha512-mtN6xk+Nac+oyJ/PrI7tzfmomRVNFIWKUbG8jdYFt52hxbiReFAXIjYskvu64/dvuW71IcB7lV8l0HvZMac6Jg=="
1449
+    },
1450
+    "video.js": {
1451
+      "version": "8.6.1",
1452
+      "resolved": "https://registry.npmjs.org/video.js/-/video.js-8.6.1.tgz",
1453
+      "integrity": "sha512-CNYVJ5WWIZ7bOhbkkfcKqLGoc6WsE3Ft2RfS1lXdQTWk8UiSsPW2Ssk2JzPCA8qnIlUG9os/faCFsYWjyu4JcA==",
1454
+      "requires": {
1455
+        "@babel/runtime": "^7.12.5",
1456
+        "@videojs/http-streaming": "3.7.0",
1457
+        "@videojs/vhs-utils": "^4.0.0",
1458
+        "@videojs/xhr": "2.6.0",
1459
+        "aes-decrypter": "^4.0.1",
1460
+        "global": "4.4.0",
1461
+        "keycode": "2.2.0",
1462
+        "m3u8-parser": "^6.0.0",
1463
+        "mpd-parser": "^1.0.1",
1464
+        "mux.js": "^7.0.1",
1465
+        "safe-json-parse": "4.0.0",
1466
+        "videojs-contrib-quality-levels": "4.0.0",
1467
+        "videojs-font": "4.1.0",
1468
+        "videojs-vtt.js": "0.15.5"
1469
+      }
1470
+    },
1471
+    "videojs-contrib-hls": {
1472
+      "version": "5.15.0",
1473
+      "resolved": "https://registry.npmjs.org/videojs-contrib-hls/-/videojs-contrib-hls-5.15.0.tgz",
1474
+      "integrity": "sha512-18zbMYZ0XRBKTPEayA9bFTWWrqhT9b4G8+zf0czJLD7Epe5PcK1I/3dflTHQeQ5rwlWir+/XnFU3sMg/B2MMcw==",
1475
+      "requires": {
1476
+        "aes-decrypter": "1.0.3",
1477
+        "global": "^4.3.0",
1478
+        "m3u8-parser": "2.1.0",
1479
+        "mux.js": "4.3.2",
1480
+        "url-toolkit": "^2.1.3",
1481
+        "video.js": "^5.19.1 || ^6.2.0",
1482
+        "videojs-contrib-media-sources": "4.7.2",
1483
+        "webwackify": "0.1.6"
1484
+      },
1485
+      "dependencies": {
1486
+        "aes-decrypter": {
1487
+          "version": "1.0.3",
1488
+          "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-1.0.3.tgz",
1489
+          "integrity": "sha512-rsx8pfx7wJsn+ziYbpJ8XA5c93hKAtBCrfydxJqJCMT+qfjipd/B5wC2xHtBcoxyvlqJcpeAo3K55t0lXOn9yQ==",
1490
+          "requires": {
1491
+            "pkcs7": "^0.2.3"
1492
+          }
1493
+        },
1494
+        "m3u8-parser": {
1495
+          "version": "2.1.0",
1496
+          "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-2.1.0.tgz",
1497
+          "integrity": "sha512-WbEpQ2FUaNGbJ0YanSeyj9D9ruu4FUvz+ZvebIzI2bSME+PUwcPXO1kKXZkjcPUAFruDikoOI5fWQNIA6JCCOQ=="
1498
+        },
1499
+        "mux.js": {
1500
+          "version": "4.3.2",
1501
+          "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-4.3.2.tgz",
1502
+          "integrity": "sha512-g0q6DPdvb3yYcoK7ElBGobdSSrhY/RjPt19U7uUc733aqvc5bCS/aCvL9z+448y+IoCZnYDwyZfQBBXMSmGOaQ=="
1503
+        },
1504
+        "pkcs7": {
1505
+          "version": "0.2.3",
1506
+          "resolved": "https://registry.npmjs.org/pkcs7/-/pkcs7-0.2.3.tgz",
1507
+          "integrity": "sha512-kJRwmADEQUg+qJyRgWLtpEL9q9cFjZschejTEK3GRjKvnsU9G5WWoe/wKqRgbBoqWdVSeTUKP6vIA3Y72M3rWA=="
1508
+        },
1509
+        "process": {
1510
+          "version": "0.5.2",
1511
+          "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
1512
+          "integrity": "sha512-oNpcutj+nYX2FjdEW7PGltWhXulAnFlM0My/k48L90hARCOJtvBbQXc/6itV2jDvU5xAAtonP+r6wmQgCcbAUA=="
1513
+        },
1514
+        "video.js": {
1515
+          "version": "6.13.0",
1516
+          "resolved": "https://registry.npmjs.org/video.js/-/video.js-6.13.0.tgz",
1517
+          "integrity": "sha512-36/JR/GhPQSZj0o+GNbhcEYv/b0SkV9SQsjlodAnzMQYN0TA7VhmqrKPYMCi1NGRYu7S9W3OaFCFoUxkYfSVlg==",
1518
+          "requires": {
1519
+            "babel-runtime": "^6.9.2",
1520
+            "global": "4.3.2",
1521
+            "safe-json-parse": "4.0.0",
1522
+            "tsml": "1.0.1",
1523
+            "videojs-font": "2.1.0",
1524
+            "videojs-ie8": "1.1.2",
1525
+            "videojs-vtt.js": "0.12.6",
1526
+            "xhr": "2.4.0"
1527
+          },
1528
+          "dependencies": {
1529
+            "global": {
1530
+              "version": "4.3.2",
1531
+              "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz",
1532
+              "integrity": "sha512-/4AybdwIDU4HkCUbJkZdWpe4P6vuw/CUtu+0I1YlLIPe7OlUO7KNJ+q/rO70CW2/NW6Jc6I62++Hzsf5Alu6rQ==",
1533
+              "requires": {
1534
+                "min-document": "^2.19.0",
1535
+                "process": "~0.5.1"
1536
+              }
1537
+            }
1538
+          }
1539
+        },
1540
+        "videojs-font": {
1541
+          "version": "2.1.0",
1542
+          "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-2.1.0.tgz",
1543
+          "integrity": "sha512-zFqWpLrXf1q8NtYx5qtZhMC6SLUFScDmR6j+UGPogobxR21lvXShhnzcNNMdOxJUuFLiToJ/BPpFUQwX4xhpvA=="
1544
+        },
1545
+        "videojs-vtt.js": {
1546
+          "version": "0.12.6",
1547
+          "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.12.6.tgz",
1548
+          "integrity": "sha512-XFXeGBQiljnElMhwCcZst0RDbZn2n8LU7ZScXryd3a00OaZsHAjdZu/7/RdSr7Z1jHphd45FnOvOQkGK4YrWCQ==",
1549
+          "requires": {
1550
+            "global": "^4.3.1"
1551
+          }
1552
+        }
1553
+      }
1554
+    },
1555
+    "videojs-contrib-media-sources": {
1556
+      "version": "4.7.2",
1557
+      "resolved": "https://registry.npmjs.org/videojs-contrib-media-sources/-/videojs-contrib-media-sources-4.7.2.tgz",
1558
+      "integrity": "sha512-e6iCHWBFuV05EGo7v+pS9iepObXnJ9joms467gzi8ZjpKVb3ifha9M0Ja24Rd8JfvYpzjltsgDVtGFDvIg4hQQ==",
1559
+      "requires": {
1560
+        "global": "^4.3.0",
1561
+        "mux.js": "4.3.2",
1562
+        "video.js": "^5.17.0 || ^6.2.0",
1563
+        "webwackify": "0.1.6"
1564
+      },
1565
+      "dependencies": {
1566
+        "mux.js": {
1567
+          "version": "4.3.2",
1568
+          "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-4.3.2.tgz",
1569
+          "integrity": "sha512-g0q6DPdvb3yYcoK7ElBGobdSSrhY/RjPt19U7uUc733aqvc5bCS/aCvL9z+448y+IoCZnYDwyZfQBBXMSmGOaQ=="
1570
+        },
1571
+        "process": {
1572
+          "version": "0.5.2",
1573
+          "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
1574
+          "integrity": "sha512-oNpcutj+nYX2FjdEW7PGltWhXulAnFlM0My/k48L90hARCOJtvBbQXc/6itV2jDvU5xAAtonP+r6wmQgCcbAUA=="
1575
+        },
1576
+        "video.js": {
1577
+          "version": "6.13.0",
1578
+          "resolved": "https://registry.npmjs.org/video.js/-/video.js-6.13.0.tgz",
1579
+          "integrity": "sha512-36/JR/GhPQSZj0o+GNbhcEYv/b0SkV9SQsjlodAnzMQYN0TA7VhmqrKPYMCi1NGRYu7S9W3OaFCFoUxkYfSVlg==",
1580
+          "requires": {
1581
+            "babel-runtime": "^6.9.2",
1582
+            "global": "4.3.2",
1583
+            "safe-json-parse": "4.0.0",
1584
+            "tsml": "1.0.1",
1585
+            "videojs-font": "2.1.0",
1586
+            "videojs-ie8": "1.1.2",
1587
+            "videojs-vtt.js": "0.12.6",
1588
+            "xhr": "2.4.0"
1589
+          },
1590
+          "dependencies": {
1591
+            "global": {
1592
+              "version": "4.3.2",
1593
+              "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz",
1594
+              "integrity": "sha512-/4AybdwIDU4HkCUbJkZdWpe4P6vuw/CUtu+0I1YlLIPe7OlUO7KNJ+q/rO70CW2/NW6Jc6I62++Hzsf5Alu6rQ==",
1595
+              "requires": {
1596
+                "min-document": "^2.19.0",
1597
+                "process": "~0.5.1"
1598
+              }
1599
+            }
1600
+          }
1601
+        },
1602
+        "videojs-font": {
1603
+          "version": "2.1.0",
1604
+          "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-2.1.0.tgz",
1605
+          "integrity": "sha512-zFqWpLrXf1q8NtYx5qtZhMC6SLUFScDmR6j+UGPogobxR21lvXShhnzcNNMdOxJUuFLiToJ/BPpFUQwX4xhpvA=="
1606
+        },
1607
+        "videojs-vtt.js": {
1608
+          "version": "0.12.6",
1609
+          "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.12.6.tgz",
1610
+          "integrity": "sha512-XFXeGBQiljnElMhwCcZst0RDbZn2n8LU7ZScXryd3a00OaZsHAjdZu/7/RdSr7Z1jHphd45FnOvOQkGK4YrWCQ==",
1611
+          "requires": {
1612
+            "global": "^4.3.1"
1613
+          }
1614
+        }
1615
+      }
1616
+    },
1617
+    "videojs-contrib-quality-levels": {
1618
+      "version": "4.0.0",
1619
+      "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-4.0.0.tgz",
1620
+      "integrity": "sha512-u5rmd8BjLwANp7XwuQ0Q/me34bMe6zg9PQdHfTS7aXgiVRbNTb4djcmfG7aeSrkpZjg+XCLezFNenlJaCjBHKw==",
1621
+      "requires": {
1622
+        "global": "^4.4.0"
1623
+      }
1624
+    },
1625
+    "videojs-font": {
1626
+      "version": "4.1.0",
1627
+      "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-4.1.0.tgz",
1628
+      "integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
1629
+    },
1630
+    "videojs-ie8": {
1631
+      "version": "1.1.2",
1632
+      "resolved": "https://registry.npmjs.org/videojs-ie8/-/videojs-ie8-1.1.2.tgz",
1633
+      "integrity": "sha512-0Zb2T4MLkpfZbeGMK/Z93b8Lrepr+rLFoHgQV1CoDeFqXvH7b+Vsd/VHoILGxQrgCSHFQ7mAODR6oyMjuiD4/g==",
1634
+      "requires": {
1635
+        "es5-shim": "^4.5.1"
1636
+      }
1637
+    },
1638
+    "videojs-vtt.js": {
1639
+      "version": "0.15.5",
1640
+      "resolved": "https://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.5.tgz",
1641
+      "integrity": "sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ==",
1642
+      "requires": {
1643
+        "global": "^4.3.1"
1644
+      }
1645
+    },
1182 1646
     "vite": {
1183 1647
       "version": "2.9.12",
1184 1648
       "resolved": "https://registry.npmmirror.com/vite/-/vite-2.9.12.tgz",
@@ -1258,6 +1722,43 @@
1258 1722
       "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==",
1259 1723
       "dev": true
1260 1724
     },
1725
+    "webwackify": {
1726
+      "version": "0.1.6",
1727
+      "resolved": "https://registry.npmjs.org/webwackify/-/webwackify-0.1.6.tgz",
1728
+      "integrity": "sha512-pGcw1T3HpNnM/UTRQqqRkkkzythSLts05mB+7Gr00B+0VbL0m39dFL5g20rSIEUt9Wrpw+/8k+snxRlUFHhcqA=="
1729
+    },
1730
+    "xhr": {
1731
+      "version": "2.4.0",
1732
+      "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.4.0.tgz",
1733
+      "integrity": "sha512-TUbBsdAuJbX8olk9hsDwGK8P1ri1XlV+PdEWkYw+HQQbpkiBR8PLgD1F3kQDPBs9l4Px34hP9rCYAZOCCAENbw==",
1734
+      "requires": {
1735
+        "global": "~4.3.0",
1736
+        "is-function": "^1.0.1",
1737
+        "parse-headers": "^2.0.0",
1738
+        "xtend": "^4.0.0"
1739
+      },
1740
+      "dependencies": {
1741
+        "global": {
1742
+          "version": "4.3.2",
1743
+          "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz",
1744
+          "integrity": "sha512-/4AybdwIDU4HkCUbJkZdWpe4P6vuw/CUtu+0I1YlLIPe7OlUO7KNJ+q/rO70CW2/NW6Jc6I62++Hzsf5Alu6rQ==",
1745
+          "requires": {
1746
+            "min-document": "^2.19.0",
1747
+            "process": "~0.5.1"
1748
+          }
1749
+        },
1750
+        "process": {
1751
+          "version": "0.5.2",
1752
+          "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
1753
+          "integrity": "sha512-oNpcutj+nYX2FjdEW7PGltWhXulAnFlM0My/k48L90hARCOJtvBbQXc/6itV2jDvU5xAAtonP+r6wmQgCcbAUA=="
1754
+        }
1755
+      }
1756
+    },
1757
+    "xtend": {
1758
+      "version": "4.0.2",
1759
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
1760
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
1761
+    },
1261 1762
     "zrender": {
1262 1763
       "version": "5.4.4",
1263 1764
       "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",

+ 3 - 0
package.json

@@ -12,8 +12,11 @@
12 12
     "axios": "^1.4.0",
13 13
     "echarts": "^5.4.3",
14 14
     "element-plus": "^2.3.9",
15
+    "hls.js": "^1.4.12",
15 16
     "leader-line": "^1.0.7",
16 17
     "postcss-pxtorem": "^6.0.0",
18
+    "video.js": "^8.6.1",
19
+    "videojs-contrib-hls": "^5.15.0",
17 20
     "vue": "^3.2.25",
18 21
     "vue-router": "^4.2.5",
19 22
     "vue3-count-to": "^1.1.2",

+ 2 - 1
public/config.js

@@ -2,5 +2,6 @@ window.g = {
2 2
     // 获取数据请求地址
3 3
     BASE_API: "https://test.lqkj.top//cmioc3-server",
4 4
     // BASE_API: "http://192.168.4.219:12397/ioc-server",
5
-    UE_IP: "http://192.168.4.159"
5
+    // UE_IP: "http://192.168.4.159"
6
+    UE_IP: "http://127.0.0.1:80"
6 7
 };

+ 96 - 0
src/components/VideoJs.vue

@@ -0,0 +1,96 @@
1
+<template>
2
+  <div class="videoPlay">
3
+    <video ref="m3u8_video" class="video-js vjs-default-skin vjs-big-play-centered" controls>
4
+      <source :src="videoSrc" />
5
+    </video>
6
+  </div>
7
+</template>
8
+<script lang="ts" setup>
9
+import { getDevice, getVideoUrl,getvideo } from '../request/api';
10
+import { nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue";
11
+import videojs, { VideoJsPlayer } from "video.js";
12
+import "video.js/dist/video-js.css";
13
+import zh from "video.js/dist/lang/zh-CN.json";
14
+const props = withDefaults(
15
+  defineProps<{
16
+    videoSrc: string;
17
+    autoPlay?: boolean;
18
+  }>(),
19
+  { autoPlay: false }
20
+);
21
+const m3u8_video = ref();
22
+let player: VideoJsPlayer;
23
+const initPlay = async () => {
24
+  videojs.addLanguage("zh-CN", zh);
25
+  await nextTick();
26
+  const options = {
27
+    muted: true,
28
+    controls: false,
29
+    autoplay: true,
30
+    loop: true,
31
+    language: "zh-CN",
32
+    techOrder: ["html5"],
33
+  };
34
+  player = videojs(m3u8_video.value, options, () => {
35
+    videojs.log("播放器已经准备好了!");
36
+    if (props.autoPlay && props.videoSrc) {
37
+      player.play();
38
+    }
39
+    player.on("ended", () => {
40
+      videojs.log("播放结束了!");
41
+    });
42
+    player.on("error", () => {
43
+      videojs.log("播放器解析出错!");
44
+    });
45
+  });
46
+};
47
+onMounted(() => {
48
+  console.log('shidaodx', props.videoSrc);
49
+
50
+
51
+  //         //视频转码
52
+  //         getvideo({
53
+  //         "rtsp": array.src,
54
+  //         }).then((res)=>{
55
+  //             console.log('sadnuq21',res.data);
56
+  //             console.log('sadnuq2121',res.data.httpFlv);
57
+  //             array.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
58
+  //         //    array.src=res.data.httpFlv
59
+  //         })
60
+
61
+  initPlay();
62
+});
63
+//直接改变路径测试
64
+watch(
65
+  () => props.videoSrc,
66
+  () => {
67
+    player.pause();
68
+    player.src(props.videoSrc);
69
+    player.load();
70
+    if (props.videoSrc) {
71
+      player.play();
72
+    }
73
+  }
74
+);
75
+onBeforeUnmount(() => {
76
+  player?.dispose();
77
+});
78
+</script>
79
+<style lang="scss" scoped>
80
+.videoPlay {
81
+  width: 100%;
82
+  height: 100%;
83
+
84
+  .video-js {
85
+    height: 100%;
86
+    width: 100%;
87
+    object-fit: fill;
88
+  }
89
+}
90
+
91
+:deep(.vjs-tech) {
92
+  object-fit: fill;
93
+}
94
+</style>
95
+     
96
+  

+ 121 - 95
src/components/right.vue

@@ -16,15 +16,15 @@
16 16
                         <img :src="d2img" alt="">
17 17
                         <div class="percent" style="display: flex;justify-content: space-between;">
18 18
                             <a>在线</a> <a>{{ equipmentTotal.online }} <span>(个)</span> </a>
19
-                            
19
+
20 20
                         </div>
21 21
                     </div>
22 22
                     <div class="item_r">
23 23
                         <img :src="d3img" alt="">
24 24
                         <div class="percent" style="display: flex;justify-content: space-between;">
25 25
                             <a>离线</a> <a>{{ equipmentTotal.underline }} <span>(个)</span> </a>
26
-                             
27
-                    
26
+
27
+
28 28
                         </div>
29 29
                     </div>
30 30
                 </div>
@@ -42,7 +42,7 @@
42 42
                         <!-- <img :src="'src/assets/img/' + item.icon + '.png'" alt=""> -->
43 43
                     </CircleProgress>
44 44
 
45
-                    <div  class="text">{{ item.text }}</div>
45
+                    <div class="text">{{ item.text }}</div>
46 46
 
47 47
                     <!-- <el-tooltip placement="bottom">
48 48
                         <template    #content> multiple lines<br />second line </template>
@@ -50,7 +50,7 @@
50 50
                             测试测试测试
51 51
                         </el-text>
52 52
                     </el-tooltip> -->
53
-            
53
+
54 54
                 </div>
55 55
             </div>
56 56
         </div>
@@ -60,53 +60,43 @@
60 60
                 <div class="text">智慧教室实时监控</div>
61 61
             </div>
62 62
 
63
-            <div class="monitorContent">
64
-                <el-carousel class="monitor" :interval="8000" @change="monitorchange">
63
+            <div class="monitorContent" v-if="asd">
64
+
65
+
66
+
67
+                <el-carousel class="monitor" :interval="10000" @change="monitorchange">
65 68
                     <el-carousel-item v-for="(item, index2) in carouselData" :key="index2">
66
-                        <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px;">{{ item.activeMonitor.title }}</p>
67
-                        <div class="interactclass" >
69
+                        <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px;">{{ item.activeMonitor.title }}
70
+                        </p>
71
+                        <div class="interactclass">
68 72
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
69 73
                                 <span style="z-index: 99;">{{ item.title }}</span>
70
-                            
71
-                                <div v-if="item.src &&videoindex==index2"  style="width: 100%;height: 100%;" @click="lookVideo(item)">
72
-                                    <div  class="vue3VideoPlay ">
73
-                                        <vue3VideoPlay 
74
-                                    
75
-                                    width="100%"
76
-                                    height="8.8vh"
77
-                                    style=" object-fit: fill"
78
-                                    :src="item.src"
79
-                                    :type="videoData.type"
80
-                                    :autoPlay="true"
81
-                                    :control="false"
82
-                                    :preload="meta"
83
-                                   />
74
+
75
+                                <div v-if="item.src && videoindex == index2" style="width: 100%;height: 100%;"
76
+                                    @click="lookVideo(item)">
77
+                                    <div class="vue3VideoPlay " style='width: 100%;height: 8.8vh;'>
78
+
79
+                                        <VideoJs :videoSrc="item.src" autoPlay />
80
+
84 81
 
85 82
                                     </div>
86 83
                                 </div>
87 84
                             </div>
88 85
                         </div>
89 86
 
90
-                        <p style="margin-top: 18px;margin-left: 12px;  margin-bottom: 3px; font-size: 14px; " >{{ item.activeMonitor.title1 }}</p>
87
+                        <p style="margin-top: 18px;margin-left: 12px;  margin-bottom: 3px; font-size: 14px; ">{{
88
+                            item.activeMonitor.title1 }}</p>
91 89
                         <div class="interactclass">
92 90
                             <div class="room" v-for="(item, index) in item.activeMonitor.array1" :key="index">
93
-                                <span  style="z-index: 99;">{{ item.title }}</span>
94
-               
95
-                                <div v-if="item.src &&videoindex==index2"  style="width: 100%;height: 100%;" @click="lookVideo(item)">
96
-                                    <div  class="vue3VideoPlay ">
97
-                                        <vue3VideoPlay 
98
-                                    
99
-                                    width="100%"
100
-                                    height="9vh"
101
-                                    style="object-fit: fill"
102
-                                    :src="item.src"
103
-                                    :type="videoData.type"
104
-                                    :autoPlay="true"
105
-                                    :control="false"
106
-                                    :preload="meta"
107
-                                   />
91
+                                <span style="z-index: 99;">{{ item.title }}</span>
92
+
93
+                                <div v-if="item.src && videoindex == index2" style="width: 100%;height: 100%;"
94
+                                    @click="lookVideo(item)">
95
+                                    <div class="vue3VideoPlay " style='width: 100%;height: 8.8vh;'>
96
+
97
+                                        <VideoJs :videoSrc="item.src" autoPlay />
108 98
                                     </div>
109
-                            
99
+
110 100
                                 </div>
111 101
                             </div>
112 102
                         </div>
@@ -118,7 +108,8 @@
118 108
     </el-aside>
119 109
 
120 110
     <!-- 视频播放弹框 -->
121
-    <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="62%" align="center" top="8%" style="z-index: 2015;">
111
+    <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="62%" align="center" top="8%"
112
+        style="z-index: 2015;">
122 113
         <videoPlay v-bind="videoData" />
123 114
 
124 115
         <!-- {{ videoData.src }} -->
@@ -126,18 +117,24 @@
126 117
 </template>
127 118
 
128 119
 <script >
129
-import { reactive, onMounted, ref, nextTick } from 'vue';
120
+import { reactive, onBeforeMount, ref, nextTick } from 'vue';
130 121
 import { ElCarousel, ElCarouselItem } from "element-plus";
131 122
 import "vue3-video-play/dist/style.css";
132 123
 import { videoPlay } from "vue3-video-play";
133 124
 // import CircleProgress from './CircleProgress.vue';
134
-import { getDevice, getVideoUrl,getvideo } from '../request/api';
125
+import { getDevice, getVideoUrl, getvideo } from '../request/api';
126
+//找到你的组件地址引入进来
127
+import VideoJs from "./VideoJs.vue";
135 128
 
136 129
 
137 130
 export default ({
138 131
     name: 'Histogram',
139
-    components: { videoPlay, ElCarousel, ElCarouselItem,  },
132
+    components: { videoPlay, ElCarousel, ElCarouselItem, },
140 133
     setup() {
134
+
135
+        const data = reactive({
136
+            videoSrc: "http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8",
137
+        });
141 138
         // 视频数据
142 139
         const videoData = reactive({
143 140
             width: "100%", //播放器高度
@@ -170,14 +167,38 @@ export default ({
170 167
         });
171 168
         //视频播放弹框
172 169
         const videoDialog = ref(false)
170
+        const asd = ref(false)
173 171
 
174 172
         //播放视频索引
175
-        const videoindex = ref(0)
176
-        const monitorchange = function (val) {
177
-            console.log('ssbadbuasd',val);
178
-           setTimeout(() => {
179
-            videoindex.value=val
180
-           }, 500);
173
+        let videoindex = ref(0)
174
+        let monitorchange = function (val) {
175
+
176
+            // let videos = document.querySelectorAll('.interactclass video');
177
+
178
+            // setTimeout(() => {
179
+            //     for (let video of videos) {
180
+            //     console.log("sbdadbdbdb",video);
181
+            // video.pause();
182
+
183
+
184
+            // video.removeAttribute('src'); // empty source
185
+            // video.load();
186
+            // // video.remove();
187
+            // video.destroy();
188
+            // video.load();
189
+            // video.scr='';
190
+
191
+            // video.style.display = 'none';
192
+
193
+
194
+            // video=null;
195
+            // // video.dispose();
196
+            // }
197
+            // }, 500);
198
+
199
+            setTimeout(() => {
200
+                videoindex.value = val
201
+            }, 500);
181 202
         }
182 203
 
183 204
         // const  videoshow = ref(true)
@@ -186,14 +207,14 @@ export default ({
186 207
         const lookVideo = function (item) {
187 208
             videoDialog.value = true;
188 209
             dialogTitle.value = item.title
189
-            let copysrc=JSON.parse(JSON.stringify(item))
190
-            console.log('sadi2',copysrc);
210
+            let copysrc = JSON.parse(JSON.stringify(item))
211
+            console.log('sadi2', copysrc);
191 212
             // videoData.src = item.scr
192 213
             videoData.src = copysrc.src
193 214
             console.log('kankna222', videoData.src);
194 215
 
195
-            
196
-         
216
+
217
+
197 218
             // getVideoUrl({ "rtsp": item.src }).then((res) => {
198 219
             //     console.log("视频处理", res);
199 220
             //     console.log("视频处理2", res.data.httpFlv);
@@ -211,11 +232,14 @@ export default ({
211 232
         let equipmentTotal = ref({})
212 233
         // 物联设备类型统计
213 234
         let interDevice = ref([])
235
+
236
+
214 237
         // 智慧教室
215 238
         let carouselData = ref([
216
-           
239
+
217 240
         ])
218 241
 
242
+
219 243
         //获取页面数据
220 244
         const getDeviceData = async () => {
221 245
 
@@ -228,67 +252,68 @@ export default ({
228 252
             // })
229 253
 
230 254
             let res = await getDevice()
231
-            console.log('s12312123',res);
255
+            console.log('s12312123', res);
232 256
             if (res.code !== 200) {
233 257
                 ElMessage.error("数据请求出错");
234 258
             }
235 259
             let { category, monitor, status } = res.data
236
-                  //物联设备统计
237
-                  equipmentTotal.value = status
260
+            //物联设备统计
261
+            equipmentTotal.value = status
238 262
             // 物联设备类型数据
239
-            console.log('sadui12u31',category);
263
+            console.log('sadui12u31', category);
240 264
             //截取数组前6项
241 265
             interDevice.value = category;
242
-      
243
-             // 互动教室
244
-             carouselData.value = monitor;
245
-      
246
-             carouselData.value.map((res)=>{
247
-                console.log('sadhi2',res.activeMonitor);
248
-
249
-                res.activeMonitor.array.map(array =>{
250
-              
266
+
267
+
268
+
269
+            monitor.map((res) => {
270
+                console.log('sadhi2', res.activeMonitor);
271
+
272
+                res.activeMonitor.array.map(array => {
273
+
251 274
                     //视频转码
252 275
                     getvideo({
253
-                    "rtsp": array.src,
254
-                    }).then((res)=>{
255
-                        console.log('sadnuq21',res.data);
256
-                        console.log('sadnuq2121',res.data.httpFlv);
257
-                        // array.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
258
-                       array.src=res.data.httpFlv
276
+                        "rtsp": array.src,
277
+                    }).then((res) => {
278
+                        console.log('sadnuq21', res.data);
279
+                        console.log('sadnuq2121', res.data.httpFlv);
280
+                        // array.src = 'http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
281
+                           array.src=res.data.httpFlv
259 282
                     })
260 283
 
261
-                    
284
+
262 285
                 })
263
-                res.activeMonitor.array1.map(array1 =>{
264
-                    console.log('asdui1231',array1);
265
-                       //视频转码
266
-                       getvideo({
267
-                    "rtsp": array1.src,
268
-                    }).then((res)=>{
269
-                        console.log('sadnuq212123s2',res.data);
270
-                        // array1.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
271
-                       array1.src=res.data.httpFlv
286
+                res.activeMonitor.array1.map(array1 => {
287
+                    console.log('asdui1231', array1);
288
+                    //视频转码
289
+                    getvideo({
290
+                        "rtsp": array1.src,
291
+                    }).then((res) => {
292
+                        console.log('sadnuq212123s2', res.data);
293
+                        // array1.src = 'http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
294
+                           array1.src=res.data.httpFlv
272 295
                     })
273 296
                 })
274 297
 
275 298
 
276 299
             })
300
+            // 互动教室
301
+            carouselData.value = monitor;
302
+            
303
+            console.log('hshshhs',carouselData.value);
277 304
 
278
-                 
279 305
 
280 306
 
307
+        }
281 308
 
282
-                // setTimeout(() => {
283
-                //     console.log('处理后监控视频数据===',carouselData.value);
284
-                // }, 2000);
309
+        onBeforeMount(() => {
285 310
 
286
-      
311
+            getDeviceData()
287 312
 
288
-        }
313
+            setTimeout(() => {
314
+                asd.value=true
315
+            }, 1000);
289 316
 
290
-        onMounted(() => {
291
-            getDeviceData()
292 317
         })
293 318
         const d1img = ref('./img/d1_1.png');
294 319
         const d12img = ref('./img/d1_2.png');
@@ -311,7 +336,9 @@ export default ({
311 336
             deviceImg,
312 337
             dialogTitle,
313 338
             monitorchange,
314
-            videoindex
339
+            videoindex,
340
+            data,
341
+            asd
315 342
         }
316 343
     },
317 344
 })
@@ -353,5 +380,4 @@ export default ({
353 380
     }
354 381
 
355 382
 
356
-}
357
-</style>
383
+}</style>

+ 3 - 0
src/main.js

@@ -8,6 +8,9 @@ import 'element-plus/dist/index.css'
8 8
 
9 9
 import vue3videoPlay from 'vue3-video-play' // 引入组件
10 10
 import 'vue3-video-play/dist/style.css' // 引入css
11
+import videojs from "video.js";
12
+import "video.js/dist/video-js.css";
13
+// Vue.prototype.$video = videojs;
11 14
 
12 15
 
13 16