diff --git a/apps/web-antd/src/api/sis/stream/index.ts b/apps/web-antd/src/api/sis/stream/index.ts index 65f08721..c233a1f5 100644 --- a/apps/web-antd/src/api/sis/stream/index.ts +++ b/apps/web-antd/src/api/sis/stream/index.ts @@ -12,9 +12,10 @@ export function addStreamProxy(params?: any) { params, ); } + export function addFFmpegStreamProxy(params?: any) { return requestClient.post( - 'sis/stream/realtime/addFfmpeg', + 'sis/stream/FFmpeg/proxy', params, ); } diff --git a/apps/web-antd/src/utils/video.ts b/apps/web-antd/src/utils/video.ts new file mode 100644 index 00000000..606cee2e --- /dev/null +++ b/apps/web-antd/src/utils/video.ts @@ -0,0 +1,21 @@ +/** + * 验证浏览器是否支持播放h265 编码的视频流 + */ +export function checkHEVCSupport() { + const video = document.createElement('video'); + const h265Support = { + hevc: false, + hvc1: false, + }; + + // 测试不同的HEVC MIME类型 + if (video.canPlayType) { + h265Support.hevc = + video.canPlayType('video/mp4; codecs="hev1.1.6.L93.B0"') !== ''; + h265Support.hvc1 = + video.canPlayType('video/mp4; codecs="hvc1.1.6.L93.B0"') !== ''; + } + const result = h265Support.hevc || h265Support.hvc1; + console.log('当前浏览器是否支持h265:' + result); + return result; +} diff --git a/apps/web-antd/src/views/sis/acAdmin/index.vue b/apps/web-antd/src/views/sis/acAdmin/index.vue index cbf4ed1d..dd871237 100644 --- a/apps/web-antd/src/views/sis/acAdmin/index.vue +++ b/apps/web-antd/src/views/sis/acAdmin/index.vue @@ -27,10 +27,12 @@