-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -67,17 +82,15 @@
import { onMounted, onUnmounted, ref, toRaw } from 'vue';
import { Loading, Page } from '@vben/common-ui';
import ChannelTree from './channel-tree.vue';
+import Process from './process.vue';
import mpegts from 'mpegts.js';
-import { message } from 'ant-design-vue';
+import { DatePicker, message } from 'ant-design-vue';
import { addStreamProxy } from '#/api/sis/stream';
-import {
- Svg16FrameIcon,
- Svg1FrameIcon,
- Svg4FrameIcon,
- Svg9FrameIcon,
-} from '@vben/icons';
import { checkHEVCSupport } from '#/utils/video';
import type { AddStreamProxyResult } from '#/api/sis/stream/model';
+import { CaretRightOutlined, PauseCircleOutlined } from '@ant-design/icons-vue';
+import type { Dayjs } from 'dayjs';
+import dayjs from 'dayjs';
const selected = 'selected';
@@ -107,12 +120,18 @@ const currentSelectPlayerIndex = ref(0);
const playerList: any[] = [];
// 播放器loading
const playerLoading = ref
([]);
-
// 当前选择播放器的key
const currentSelectKey = ref('');
// 当前所有的播放设备key
const selectKeys = ref([]);
+const playering = ref(true);
+const playDate = ref();
+
+function onPlayerBtnClick() {
+ playering.value = !playering.value;
+}
+
function playerSelect(index: number) {
currentSelectPlayerIndex.value = index;
const player = playerList[index];
@@ -435,11 +454,20 @@ function loading(index: number, cmd: Number = 0) {
playerLoading.value = loadinArr;
}
+const processDate = ref('');
let isSupportH265 = false;
onMounted(() => {
// 检测浏览器是否支持h265
isSupportH265 = checkHEVCSupport();
- setInterval(catchUp, 120000);
+ // setInterval(catchUp, 120000);
+ // 初始化当前日期
+ const now = dayjs();
+ playDate.value = now;
+
+ processDate.value = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
+ setInterval(() => {
+ processDate.value = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
+ }, 1000);
});
onUnmounted(() => {
@@ -447,20 +475,6 @@ onUnmounted(() => {
closePlayer(i);
}
});
-
-function catchUp() {
- playerList.forEach((playerData) => {
- 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; // 跳转到接近直播点
- }
- }
- });
-}
diff --git a/apps/web-antd/src/views/sis/video/playback/process.vue b/apps/web-antd/src/views/sis/video/playback/process.vue
new file mode 100644
index 00000000..52d9ced7
--- /dev/null
+++ b/apps/web-antd/src/views/sis/video/playback/process.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/tsconfig.json b/apps/web-antd/tsconfig.json
index d45e3d7a..40a9fdef 100644
--- a/apps/web-antd/tsconfig.json
+++ b/apps/web-antd/tsconfig.json
@@ -3,6 +3,7 @@
"extends": "@vben/tsconfig/web-app.json",
"compilerOptions": {
"baseUrl": ".",
+ "allowJs": true,
"paths": {
"#/*": [
"./src/*"