feat(视频播放器): 重构视频播放器逻辑并添加hls.js支持
将视频播放器核心逻辑抽离为useVideoPlayer组合式函数,优化错误处理和重试机制 添加hls.js依赖以支持HLS视频格式播放 简化VideoPlayer组件代码,提高可维护性
Showing
4 changed files
with
9 additions
and
0 deletions
| ... | @@ -37,6 +37,7 @@ | ... | @@ -37,6 +37,7 @@ |
| 37 | "@vue-office/pptx": "^1.0.1", | 37 | "@vue-office/pptx": "^1.0.1", |
| 38 | "browser-md5-file": "^1.1.1", | 38 | "browser-md5-file": "^1.1.1", |
| 39 | "dayjs": "^1.11.13", | 39 | "dayjs": "^1.11.13", |
| 40 | + "hls.js": "^1.6.15", | ||
| 40 | "html-to-image": "^1.11.13", | 41 | "html-to-image": "^1.11.13", |
| 41 | "html2canvas": "^1.4.1", | 42 | "html2canvas": "^1.4.1", |
| 42 | "lodash": "^4.17.21", | 43 | "lodash": "^4.17.21", | ... | ... |
| ... | @@ -50,6 +50,9 @@ importers: | ... | @@ -50,6 +50,9 @@ importers: |
| 50 | dayjs: | 50 | dayjs: |
| 51 | specifier: ^1.11.13 | 51 | specifier: ^1.11.13 |
| 52 | version: 1.11.19 | 52 | version: 1.11.19 |
| 53 | + hls.js: | ||
| 54 | + specifier: ^1.6.15 | ||
| 55 | + version: 1.6.15 | ||
| 53 | html-to-image: | 56 | html-to-image: |
| 54 | specifier: ^1.11.13 | 57 | specifier: ^1.11.13 |
| 55 | version: 1.11.13 | 58 | version: 1.11.13 |
| ... | @@ -1246,6 +1249,9 @@ packages: | ... | @@ -1246,6 +1249,9 @@ packages: |
| 1246 | resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} | 1249 | resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} |
| 1247 | engines: {node: '>= 0.4'} | 1250 | engines: {node: '>= 0.4'} |
| 1248 | 1251 | ||
| 1252 | + hls.js@1.6.15: | ||
| 1253 | + resolution: {integrity: sha512-E3a5VwgXimGHwpRGV+WxRTKeSp2DW5DI5MWv34ulL3t5UNmyJWCQ1KmLEHbYzcfThfXG8amBL+fCYPneGHC4VA==} | ||
| 1254 | + | ||
| 1249 | html-to-image@1.11.13: | 1255 | html-to-image@1.11.13: |
| 1250 | resolution: {integrity: sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg==} | 1256 | resolution: {integrity: sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg==} |
| 1251 | 1257 | ||
| ... | @@ -3266,6 +3272,8 @@ snapshots: | ... | @@ -3266,6 +3272,8 @@ snapshots: |
| 3266 | dependencies: | 3272 | dependencies: |
| 3267 | function-bind: 1.1.2 | 3273 | function-bind: 1.1.2 |
| 3268 | 3274 | ||
| 3275 | + hls.js@1.6.15: {} | ||
| 3276 | + | ||
| 3269 | html-to-image@1.11.13: {} | 3277 | html-to-image@1.11.13: {} |
| 3270 | 3278 | ||
| 3271 | html2canvas@1.4.1: | 3279 | html2canvas@1.4.1: | ... | ... |
This diff is collapsed. Click to expand it.
src/composables/useVideoPlayer.js
0 → 100644
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment