From 1d18b7b52b5694cb563e2607677bc86ea0f5ac4c Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Thu, 22 Oct 2026 18:12:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin):=20=E6=B8=85=E6=99=B0=E5=BA=A6?= =?UTF-8?q?=E4=BA=A7=E7=89=A9=E6=94=AF=E6=8C=81=20HLS=20=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/locales/en.ts | 3 + src/locales/zh-CN.ts | 3 + .../upload/EpisodeTranscodeRenditions.vue | 47 +++---- .../upload/RenditionPlayerDialog.vue | 126 ++++++++++++++++++ 5 files changed, 150 insertions(+), 30 deletions(-) create mode 100644 src/views/contentManagement/upload/RenditionPlayerDialog.vue diff --git a/package.json b/package.json index 4153b9f..9fa89f3 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "echarts": "^5.4.3", "echarts-wordcloud": "^2.1.0", "element-plus": "2.5.5", + "hls.js": "^1.7.3", "lodash-es": "^4.17.21", "mitt": "^3.0.1", "nprogress": "^0.2.0", diff --git a/src/locales/en.ts b/src/locales/en.ts index b0dbe88..26c7faa 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -559,6 +559,9 @@ export default { actions: 'Actions', copyUrl: 'Copy playback URL', openUrl: 'Open in new window', + play: 'Preview playback', + playerFailed: 'Playback failed, please check the rendition output', + playerUnsupported: 'This browser does not support HLS playback', copySuccess: 'Playback URL copied', copyFailed: 'Failed to copy playback URL', openFailed: 'Unable to open playback URL', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 9865516..1387d44 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -553,6 +553,9 @@ export default { actions: '操作', copyUrl: '复制播放地址', openUrl: '新窗口打开', + play: '预览播放', + playerFailed: '播放失败,请检查产物是否完整', + playerUnsupported: '当前浏览器不支持 HLS 播放', copySuccess: '播放地址已复制', copyFailed: '复制播放地址失败', openFailed: '无法打开播放地址', diff --git a/src/views/contentManagement/upload/EpisodeTranscodeRenditions.vue b/src/views/contentManagement/upload/EpisodeTranscodeRenditions.vue index c965a2b..b2f73d8 100644 --- a/src/views/contentManagement/upload/EpisodeTranscodeRenditions.vue +++ b/src/views/contentManagement/upload/EpisodeTranscodeRenditions.vue @@ -2,12 +2,12 @@ @@ -82,21 +72,18 @@ function openPlayUrl(url: string) { - + + +