From d2102ac20a468761e7d3973829600234a8fea4f9 Mon Sep 17 00:00:00 2001 From: lxj <15683799673@163.com> Date: Thu, 28 Aug 2025 09:10:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=B5=81=E9=80=82?= =?UTF-8?q?=E9=85=8D=E5=86=85=E5=A4=96=E7=BD=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/sis/stream/model.d.ts | 2 ++ apps/web-antd/src/views/sis/video/index.vue | 29 ++++++++++++--------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/apps/web-antd/src/api/sis/stream/model.d.ts b/apps/web-antd/src/api/sis/stream/model.d.ts index 8993f651..dde8e896 100644 --- a/apps/web-antd/src/api/sis/stream/model.d.ts +++ b/apps/web-antd/src/api/sis/stream/model.d.ts @@ -1,5 +1,7 @@ export interface AddStreamProxyResult { key:string; + app:string; + streamId:string; rtsp:string; rtmp:string; flv:string; diff --git a/apps/web-antd/src/views/sis/video/index.vue b/apps/web-antd/src/views/sis/video/index.vue index 1d570d1d..fa537334 100644 --- a/apps/web-antd/src/views/sis/video/index.vue +++ b/apps/web-antd/src/views/sis/video/index.vue @@ -2,11 +2,8 @@
-
- +
+
@@ -52,7 +49,7 @@ import { Page } from '@vben/common-ui'; import ChannelTree from './channel-tree.vue'; import mpegts from 'mpegts.js'; import { message } from 'ant-design-vue'; -import { addFFmpegStreamProxy, addStreamProxy } from '#/api/sis/stream'; +import { addStreamProxy } from '#/api/sis/stream'; import { Svg16FrameIcon, Svg1FrameIcon, @@ -296,8 +293,8 @@ function streamProxy(nodeData: any, cb: Function) { if (isSupportH265) { addStreamProxy(params).then((res) => cb(res)); } else { - addFFmpegStreamProxy(params).then((res) => cb(res)); - // addStreamProxy(params).then((res) => cb(res)); + // addFFmpegStreamProxy(params).then((res) => cb(res)); + addStreamProxy(params).then((res) => cb(res)); } } @@ -310,7 +307,8 @@ function doPlayer(nodeData: any, index: number = 0) { console.log('index=', index); if (mpegts.isSupported()) { streamProxy(nodeData, (res: AddStreamProxyResult) => { - const url = res.wsFlv; + const host = window.location.host; + const url = `http://${host}/${res.app}/${res.streamId}.live.flv`; // 将url 绑定到 nodeData nodeData.url = url; closePlayer(index); @@ -337,7 +335,9 @@ function doPlayer(nodeData: any, index: number = 0) { player.play(); playerList[index] = { player, + key: nodeData.id, data: nodeData, + el: videoElement, }; } else { console.log('视频播放元素获取异常'); @@ -381,10 +381,13 @@ function catchUp() { if (playerData) { const { player, el } = playerData; const end = player.buffered.end(player.buffered.length - 1); - const diff = end - el.currentTime; - if (diff > 2) { - // 如果延迟超过2秒 - el.currentTime = end - 0.5; // 跳转到接近直播点 + const { currentTime } = el; + if (end && currentTime) { + const diff = end - el.currentTime; + if (diff > 2) { + // 如果延迟超过2秒 + el.currentTime = end - 0.5; // 跳转到接近直播点 + } } } }); -- 2.43.0 From f230decc3860889c2588955c8f45e414350ec540 Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Thu, 28 Aug 2025 14:29:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?style:=20=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E3=80=81=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../carPassRecordManagement/index.vue | 34 +-------- .../record-detail-modal.vue | 1 - .../record-detail-modal.vue | 75 ++++++++----------- 3 files changed, 37 insertions(+), 73 deletions(-) diff --git a/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue b/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue index 427a0b32..928130b0 100644 --- a/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue +++ b/apps/web-antd/src/views/property/resident/carPassRecordManagement/index.vue @@ -1,8 +1,8 @@