inl-ui 0.1.130 → 0.1.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +32 -7
- package/dist/components/index.js +32 -7
- package/dist/index.cjs +33 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +33 -8
- package/dist/video/index.cjs +32 -7
- package/dist/video/index.js +33 -8
- package/package.json +1 -1
|
@@ -9703,6 +9703,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9703
9703
|
},
|
|
9704
9704
|
emits: ["close", "change"],
|
|
9705
9705
|
setup(_prop, _context) {
|
|
9706
|
+
const videoBoxRef = vue.ref();
|
|
9706
9707
|
const player = vue.ref();
|
|
9707
9708
|
const cameraConfig = vue.ref({});
|
|
9708
9709
|
const streamHistory = vue.ref("");
|
|
@@ -9994,6 +9995,15 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9994
9995
|
};
|
|
9995
9996
|
let Mqtt = null;
|
|
9996
9997
|
const topic = vue.ref("");
|
|
9998
|
+
const {
|
|
9999
|
+
isFullscreen,
|
|
10000
|
+
enter,
|
|
10001
|
+
exit,
|
|
10002
|
+
toggle
|
|
10003
|
+
} = core.useFullscreen(videoBoxRef);
|
|
10004
|
+
vue.watch(() => isFullscreen.value, val => {
|
|
10005
|
+
clearFlogCanvas();
|
|
10006
|
+
});
|
|
9997
10007
|
const initMqtt = async ip => {
|
|
9998
10008
|
Mqtt = await useMqtt();
|
|
9999
10009
|
topic.value = `vlm/${ip}`;
|
|
@@ -10035,7 +10045,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10035
10045
|
textBox.style.position = "absolute";
|
|
10036
10046
|
textBox.style.width = "100%";
|
|
10037
10047
|
textBox.style.left = "0";
|
|
10038
|
-
textBox.style.zIndex = "
|
|
10048
|
+
textBox.style.zIndex = "1000";
|
|
10039
10049
|
textBox.style.pointerEvents = "none";
|
|
10040
10050
|
box.appendChild(textBox);
|
|
10041
10051
|
}
|
|
@@ -10046,6 +10056,20 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10046
10056
|
height: box.offsetHeight
|
|
10047
10057
|
};
|
|
10048
10058
|
};
|
|
10059
|
+
const clearFlogCanvas = () => {
|
|
10060
|
+
if (canvasDom) {
|
|
10061
|
+
canvasDom.remove();
|
|
10062
|
+
canvasDom = null;
|
|
10063
|
+
}
|
|
10064
|
+
if (textBox) {
|
|
10065
|
+
textBox.remove();
|
|
10066
|
+
textBox = null;
|
|
10067
|
+
}
|
|
10068
|
+
if (drawCleanTimer) {
|
|
10069
|
+
clearTimeout(drawCleanTimer);
|
|
10070
|
+
drawCleanTimer = null;
|
|
10071
|
+
}
|
|
10072
|
+
};
|
|
10049
10073
|
let drawCleanTimer = null;
|
|
10050
10074
|
const drawFlog = data => {
|
|
10051
10075
|
let {
|
|
@@ -10070,12 +10094,12 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10070
10094
|
});
|
|
10071
10095
|
}
|
|
10072
10096
|
if (data.text) {
|
|
10073
|
-
const fontSize =
|
|
10097
|
+
const fontSize = 16 * width / 800;
|
|
10074
10098
|
const margin = 10;
|
|
10075
10099
|
const marginTop = height * 0.1 + margin;
|
|
10076
10100
|
textBox2.innerHTML = data.text;
|
|
10077
10101
|
textBox2.style.top = marginTop + "px";
|
|
10078
|
-
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.
|
|
10102
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.8)";
|
|
10079
10103
|
textBox2.style.color = data.text_color || "red";
|
|
10080
10104
|
textBox2.style.fontSize = `${fontSize}px`;
|
|
10081
10105
|
textBox2.style.padding = `${margin}px`;
|
|
@@ -10114,7 +10138,8 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10114
10138
|
});
|
|
10115
10139
|
return () => vue.createVNode("div", {
|
|
10116
10140
|
"id": "videoBox_" + uuid.value,
|
|
10117
|
-
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
10141
|
+
"class": ["videoBox", _prop.alarm ? "alarm" : ""],
|
|
10142
|
+
"ref": videoBoxRef
|
|
10118
10143
|
}, [camera.value ? vue.createVNode(VideoPlayerV2, {
|
|
10119
10144
|
"ref": player,
|
|
10120
10145
|
"domId": uuid.value,
|
|
@@ -10157,7 +10182,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10157
10182
|
}, [vue.createVNode("div", null, [info.name ? `${info.name}\uFF1A` : ""]), vue.createVNode("div", {
|
|
10158
10183
|
"class": "value"
|
|
10159
10184
|
}, [info.displayValue && info.displayValue !== "null" ? info.displayValue + " " : ""]), vue.createVNode("div", null, [info.unit])]);
|
|
10160
|
-
})]) : "", vue.createVNode("div", {
|
|
10185
|
+
})]) : "", vue.withDirectives(vue.createVNode("div", {
|
|
10161
10186
|
"class": "footer-min",
|
|
10162
10187
|
"id": "footer_" + uuid.value
|
|
10163
10188
|
}, [vue.createVNode("div", {
|
|
@@ -10303,7 +10328,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10303
10328
|
return vue.createVNode("img", {
|
|
10304
10329
|
"onClick": e => {
|
|
10305
10330
|
e.stopPropagation();
|
|
10306
|
-
|
|
10331
|
+
toggle();
|
|
10307
10332
|
},
|
|
10308
10333
|
"src": "/micro-assets/inl/video/putUp.png"
|
|
10309
10334
|
}, null);
|
|
@@ -10316,7 +10341,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10316
10341
|
}, null);
|
|
10317
10342
|
}
|
|
10318
10343
|
}
|
|
10319
|
-
})])]), renderChangeCamera()]);
|
|
10344
|
+
})])]), [[vue.vShow, !isFullscreen.value]]), renderChangeCamera()]);
|
|
10320
10345
|
}
|
|
10321
10346
|
});
|
|
10322
10347
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|
package/dist/components/index.js
CHANGED
|
@@ -9674,6 +9674,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
9674
9674
|
},
|
|
9675
9675
|
emits: ["close", "change"],
|
|
9676
9676
|
setup(_prop, _context) {
|
|
9677
|
+
const videoBoxRef = ref();
|
|
9677
9678
|
const player = ref();
|
|
9678
9679
|
const cameraConfig = ref({});
|
|
9679
9680
|
const streamHistory = ref("");
|
|
@@ -9965,6 +9966,15 @@ const VideoBoxV2 = defineComponent({
|
|
|
9965
9966
|
};
|
|
9966
9967
|
let Mqtt = null;
|
|
9967
9968
|
const topic = ref("");
|
|
9969
|
+
const {
|
|
9970
|
+
isFullscreen,
|
|
9971
|
+
enter,
|
|
9972
|
+
exit,
|
|
9973
|
+
toggle
|
|
9974
|
+
} = useFullscreen(videoBoxRef);
|
|
9975
|
+
watch(() => isFullscreen.value, val => {
|
|
9976
|
+
clearFlogCanvas();
|
|
9977
|
+
});
|
|
9968
9978
|
const initMqtt = async ip => {
|
|
9969
9979
|
Mqtt = await useMqtt();
|
|
9970
9980
|
topic.value = `vlm/${ip}`;
|
|
@@ -10006,7 +10016,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
10006
10016
|
textBox.style.position = "absolute";
|
|
10007
10017
|
textBox.style.width = "100%";
|
|
10008
10018
|
textBox.style.left = "0";
|
|
10009
|
-
textBox.style.zIndex = "
|
|
10019
|
+
textBox.style.zIndex = "1000";
|
|
10010
10020
|
textBox.style.pointerEvents = "none";
|
|
10011
10021
|
box.appendChild(textBox);
|
|
10012
10022
|
}
|
|
@@ -10017,6 +10027,20 @@ const VideoBoxV2 = defineComponent({
|
|
|
10017
10027
|
height: box.offsetHeight
|
|
10018
10028
|
};
|
|
10019
10029
|
};
|
|
10030
|
+
const clearFlogCanvas = () => {
|
|
10031
|
+
if (canvasDom) {
|
|
10032
|
+
canvasDom.remove();
|
|
10033
|
+
canvasDom = null;
|
|
10034
|
+
}
|
|
10035
|
+
if (textBox) {
|
|
10036
|
+
textBox.remove();
|
|
10037
|
+
textBox = null;
|
|
10038
|
+
}
|
|
10039
|
+
if (drawCleanTimer) {
|
|
10040
|
+
clearTimeout(drawCleanTimer);
|
|
10041
|
+
drawCleanTimer = null;
|
|
10042
|
+
}
|
|
10043
|
+
};
|
|
10020
10044
|
let drawCleanTimer = null;
|
|
10021
10045
|
const drawFlog = data => {
|
|
10022
10046
|
let {
|
|
@@ -10041,12 +10065,12 @@ const VideoBoxV2 = defineComponent({
|
|
|
10041
10065
|
});
|
|
10042
10066
|
}
|
|
10043
10067
|
if (data.text) {
|
|
10044
|
-
const fontSize =
|
|
10068
|
+
const fontSize = 16 * width / 800;
|
|
10045
10069
|
const margin = 10;
|
|
10046
10070
|
const marginTop = height * 0.1 + margin;
|
|
10047
10071
|
textBox2.innerHTML = data.text;
|
|
10048
10072
|
textBox2.style.top = marginTop + "px";
|
|
10049
|
-
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.
|
|
10073
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.8)";
|
|
10050
10074
|
textBox2.style.color = data.text_color || "red";
|
|
10051
10075
|
textBox2.style.fontSize = `${fontSize}px`;
|
|
10052
10076
|
textBox2.style.padding = `${margin}px`;
|
|
@@ -10085,7 +10109,8 @@ const VideoBoxV2 = defineComponent({
|
|
|
10085
10109
|
});
|
|
10086
10110
|
return () => createVNode("div", {
|
|
10087
10111
|
"id": "videoBox_" + uuid.value,
|
|
10088
|
-
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
10112
|
+
"class": ["videoBox", _prop.alarm ? "alarm" : ""],
|
|
10113
|
+
"ref": videoBoxRef
|
|
10089
10114
|
}, [camera.value ? createVNode(VideoPlayerV2, {
|
|
10090
10115
|
"ref": player,
|
|
10091
10116
|
"domId": uuid.value,
|
|
@@ -10128,7 +10153,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
10128
10153
|
}, [createVNode("div", null, [info.name ? `${info.name}\uFF1A` : ""]), createVNode("div", {
|
|
10129
10154
|
"class": "value"
|
|
10130
10155
|
}, [info.displayValue && info.displayValue !== "null" ? info.displayValue + " " : ""]), createVNode("div", null, [info.unit])]);
|
|
10131
|
-
})]) : "", createVNode("div", {
|
|
10156
|
+
})]) : "", withDirectives(createVNode("div", {
|
|
10132
10157
|
"class": "footer-min",
|
|
10133
10158
|
"id": "footer_" + uuid.value
|
|
10134
10159
|
}, [createVNode("div", {
|
|
@@ -10274,7 +10299,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
10274
10299
|
return createVNode("img", {
|
|
10275
10300
|
"onClick": e => {
|
|
10276
10301
|
e.stopPropagation();
|
|
10277
|
-
|
|
10302
|
+
toggle();
|
|
10278
10303
|
},
|
|
10279
10304
|
"src": "/micro-assets/inl/video/putUp.png"
|
|
10280
10305
|
}, null);
|
|
@@ -10287,7 +10312,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
10287
10312
|
}, null);
|
|
10288
10313
|
}
|
|
10289
10314
|
}
|
|
10290
|
-
})])]), renderChangeCamera()]);
|
|
10315
|
+
})])]), [[vShow, !isFullscreen.value]]), renderChangeCamera()]);
|
|
10291
10316
|
}
|
|
10292
10317
|
});
|
|
10293
10318
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
|
45
45
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
46
46
|
var mqtt__default = /*#__PURE__*/_interopDefaultLegacy(mqtt);
|
|
47
47
|
|
|
48
|
-
var version = "0.1.
|
|
48
|
+
var version = "0.1.131";
|
|
49
49
|
|
|
50
50
|
const setTheme = theme => {
|
|
51
51
|
if (theme === "dark") {
|
|
@@ -10689,6 +10689,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10689
10689
|
},
|
|
10690
10690
|
emits: ["close", "change"],
|
|
10691
10691
|
setup(_prop, _context) {
|
|
10692
|
+
const videoBoxRef = vue.ref();
|
|
10692
10693
|
const player = vue.ref();
|
|
10693
10694
|
const cameraConfig = vue.ref({});
|
|
10694
10695
|
const streamHistory = vue.ref("");
|
|
@@ -10980,6 +10981,15 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10980
10981
|
};
|
|
10981
10982
|
let Mqtt = null;
|
|
10982
10983
|
const topic = vue.ref("");
|
|
10984
|
+
const {
|
|
10985
|
+
isFullscreen,
|
|
10986
|
+
enter,
|
|
10987
|
+
exit,
|
|
10988
|
+
toggle
|
|
10989
|
+
} = core.useFullscreen(videoBoxRef);
|
|
10990
|
+
vue.watch(() => isFullscreen.value, val => {
|
|
10991
|
+
clearFlogCanvas();
|
|
10992
|
+
});
|
|
10983
10993
|
const initMqtt = async ip => {
|
|
10984
10994
|
Mqtt = await useMqtt();
|
|
10985
10995
|
topic.value = `vlm/${ip}`;
|
|
@@ -11021,7 +11031,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11021
11031
|
textBox.style.position = "absolute";
|
|
11022
11032
|
textBox.style.width = "100%";
|
|
11023
11033
|
textBox.style.left = "0";
|
|
11024
|
-
textBox.style.zIndex = "
|
|
11034
|
+
textBox.style.zIndex = "1000";
|
|
11025
11035
|
textBox.style.pointerEvents = "none";
|
|
11026
11036
|
box.appendChild(textBox);
|
|
11027
11037
|
}
|
|
@@ -11032,6 +11042,20 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11032
11042
|
height: box.offsetHeight
|
|
11033
11043
|
};
|
|
11034
11044
|
};
|
|
11045
|
+
const clearFlogCanvas = () => {
|
|
11046
|
+
if (canvasDom) {
|
|
11047
|
+
canvasDom.remove();
|
|
11048
|
+
canvasDom = null;
|
|
11049
|
+
}
|
|
11050
|
+
if (textBox) {
|
|
11051
|
+
textBox.remove();
|
|
11052
|
+
textBox = null;
|
|
11053
|
+
}
|
|
11054
|
+
if (drawCleanTimer) {
|
|
11055
|
+
clearTimeout(drawCleanTimer);
|
|
11056
|
+
drawCleanTimer = null;
|
|
11057
|
+
}
|
|
11058
|
+
};
|
|
11035
11059
|
let drawCleanTimer = null;
|
|
11036
11060
|
const drawFlog = data => {
|
|
11037
11061
|
let {
|
|
@@ -11056,12 +11080,12 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11056
11080
|
});
|
|
11057
11081
|
}
|
|
11058
11082
|
if (data.text) {
|
|
11059
|
-
const fontSize =
|
|
11083
|
+
const fontSize = 16 * width / 800;
|
|
11060
11084
|
const margin = 10;
|
|
11061
11085
|
const marginTop = height * 0.1 + margin;
|
|
11062
11086
|
textBox2.innerHTML = data.text;
|
|
11063
11087
|
textBox2.style.top = marginTop + "px";
|
|
11064
|
-
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.
|
|
11088
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.8)";
|
|
11065
11089
|
textBox2.style.color = data.text_color || "red";
|
|
11066
11090
|
textBox2.style.fontSize = `${fontSize}px`;
|
|
11067
11091
|
textBox2.style.padding = `${margin}px`;
|
|
@@ -11100,7 +11124,8 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11100
11124
|
});
|
|
11101
11125
|
return () => vue.createVNode("div", {
|
|
11102
11126
|
"id": "videoBox_" + uuid.value,
|
|
11103
|
-
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
11127
|
+
"class": ["videoBox", _prop.alarm ? "alarm" : ""],
|
|
11128
|
+
"ref": videoBoxRef
|
|
11104
11129
|
}, [camera.value ? vue.createVNode(VideoPlayerV2, {
|
|
11105
11130
|
"ref": player,
|
|
11106
11131
|
"domId": uuid.value,
|
|
@@ -11143,7 +11168,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11143
11168
|
}, [vue.createVNode("div", null, [info.name ? `${info.name}\uFF1A` : ""]), vue.createVNode("div", {
|
|
11144
11169
|
"class": "value"
|
|
11145
11170
|
}, [info.displayValue && info.displayValue !== "null" ? info.displayValue + " " : ""]), vue.createVNode("div", null, [info.unit])]);
|
|
11146
|
-
})]) : "", vue.createVNode("div", {
|
|
11171
|
+
})]) : "", vue.withDirectives(vue.createVNode("div", {
|
|
11147
11172
|
"class": "footer-min",
|
|
11148
11173
|
"id": "footer_" + uuid.value
|
|
11149
11174
|
}, [vue.createVNode("div", {
|
|
@@ -11289,7 +11314,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11289
11314
|
return vue.createVNode("img", {
|
|
11290
11315
|
"onClick": e => {
|
|
11291
11316
|
e.stopPropagation();
|
|
11292
|
-
|
|
11317
|
+
toggle();
|
|
11293
11318
|
},
|
|
11294
11319
|
"src": "/micro-assets/inl/video/putUp.png"
|
|
11295
11320
|
}, null);
|
|
@@ -11302,7 +11327,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
11302
11327
|
}, null);
|
|
11303
11328
|
}
|
|
11304
11329
|
}
|
|
11305
|
-
})])]), renderChangeCamera()]);
|
|
11330
|
+
})])]), [[vue.vShow, !isFullscreen.value]]), renderChangeCamera()]);
|
|
11306
11331
|
}
|
|
11307
11332
|
});
|
|
11308
11333
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Key } from 'ant-design-vue/lib/table/interface';
|
|
|
11
11
|
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
12
12
|
import * as _ant_design_icons_vue_lib_components_IconFont from '@ant-design/icons-vue/lib/components/IconFont';
|
|
13
13
|
|
|
14
|
-
var version = "0.1.
|
|
14
|
+
var version = "0.1.131";
|
|
15
15
|
|
|
16
16
|
declare const _default$p: {
|
|
17
17
|
set(theme: string): void;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { XPopup, CommentBlock, setAxiosOption } from '@sszj-temp/mobile';
|
|
|
14
14
|
import { marked } from 'marked';
|
|
15
15
|
import '@sszj-temp/mobile/style.css';
|
|
16
16
|
|
|
17
|
-
var version = "0.1.
|
|
17
|
+
var version = "0.1.131";
|
|
18
18
|
|
|
19
19
|
const setTheme = theme => {
|
|
20
20
|
if (theme === "dark") {
|
|
@@ -10658,6 +10658,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
10658
10658
|
},
|
|
10659
10659
|
emits: ["close", "change"],
|
|
10660
10660
|
setup(_prop, _context) {
|
|
10661
|
+
const videoBoxRef = ref();
|
|
10661
10662
|
const player = ref();
|
|
10662
10663
|
const cameraConfig = ref({});
|
|
10663
10664
|
const streamHistory = ref("");
|
|
@@ -10949,6 +10950,15 @@ const VideoBoxV2 = defineComponent({
|
|
|
10949
10950
|
};
|
|
10950
10951
|
let Mqtt = null;
|
|
10951
10952
|
const topic = ref("");
|
|
10953
|
+
const {
|
|
10954
|
+
isFullscreen,
|
|
10955
|
+
enter,
|
|
10956
|
+
exit,
|
|
10957
|
+
toggle
|
|
10958
|
+
} = useFullscreen(videoBoxRef);
|
|
10959
|
+
watch(() => isFullscreen.value, val => {
|
|
10960
|
+
clearFlogCanvas();
|
|
10961
|
+
});
|
|
10952
10962
|
const initMqtt = async ip => {
|
|
10953
10963
|
Mqtt = await useMqtt();
|
|
10954
10964
|
topic.value = `vlm/${ip}`;
|
|
@@ -10990,7 +11000,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
10990
11000
|
textBox.style.position = "absolute";
|
|
10991
11001
|
textBox.style.width = "100%";
|
|
10992
11002
|
textBox.style.left = "0";
|
|
10993
|
-
textBox.style.zIndex = "
|
|
11003
|
+
textBox.style.zIndex = "1000";
|
|
10994
11004
|
textBox.style.pointerEvents = "none";
|
|
10995
11005
|
box.appendChild(textBox);
|
|
10996
11006
|
}
|
|
@@ -11001,6 +11011,20 @@ const VideoBoxV2 = defineComponent({
|
|
|
11001
11011
|
height: box.offsetHeight
|
|
11002
11012
|
};
|
|
11003
11013
|
};
|
|
11014
|
+
const clearFlogCanvas = () => {
|
|
11015
|
+
if (canvasDom) {
|
|
11016
|
+
canvasDom.remove();
|
|
11017
|
+
canvasDom = null;
|
|
11018
|
+
}
|
|
11019
|
+
if (textBox) {
|
|
11020
|
+
textBox.remove();
|
|
11021
|
+
textBox = null;
|
|
11022
|
+
}
|
|
11023
|
+
if (drawCleanTimer) {
|
|
11024
|
+
clearTimeout(drawCleanTimer);
|
|
11025
|
+
drawCleanTimer = null;
|
|
11026
|
+
}
|
|
11027
|
+
};
|
|
11004
11028
|
let drawCleanTimer = null;
|
|
11005
11029
|
const drawFlog = data => {
|
|
11006
11030
|
let {
|
|
@@ -11025,12 +11049,12 @@ const VideoBoxV2 = defineComponent({
|
|
|
11025
11049
|
});
|
|
11026
11050
|
}
|
|
11027
11051
|
if (data.text) {
|
|
11028
|
-
const fontSize =
|
|
11052
|
+
const fontSize = 16 * width / 800;
|
|
11029
11053
|
const margin = 10;
|
|
11030
11054
|
const marginTop = height * 0.1 + margin;
|
|
11031
11055
|
textBox2.innerHTML = data.text;
|
|
11032
11056
|
textBox2.style.top = marginTop + "px";
|
|
11033
|
-
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.
|
|
11057
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.8)";
|
|
11034
11058
|
textBox2.style.color = data.text_color || "red";
|
|
11035
11059
|
textBox2.style.fontSize = `${fontSize}px`;
|
|
11036
11060
|
textBox2.style.padding = `${margin}px`;
|
|
@@ -11069,7 +11093,8 @@ const VideoBoxV2 = defineComponent({
|
|
|
11069
11093
|
});
|
|
11070
11094
|
return () => createVNode("div", {
|
|
11071
11095
|
"id": "videoBox_" + uuid.value,
|
|
11072
|
-
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
11096
|
+
"class": ["videoBox", _prop.alarm ? "alarm" : ""],
|
|
11097
|
+
"ref": videoBoxRef
|
|
11073
11098
|
}, [camera.value ? createVNode(VideoPlayerV2, {
|
|
11074
11099
|
"ref": player,
|
|
11075
11100
|
"domId": uuid.value,
|
|
@@ -11112,7 +11137,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
11112
11137
|
}, [createVNode("div", null, [info.name ? `${info.name}\uFF1A` : ""]), createVNode("div", {
|
|
11113
11138
|
"class": "value"
|
|
11114
11139
|
}, [info.displayValue && info.displayValue !== "null" ? info.displayValue + " " : ""]), createVNode("div", null, [info.unit])]);
|
|
11115
|
-
})]) : "", createVNode("div", {
|
|
11140
|
+
})]) : "", withDirectives(createVNode("div", {
|
|
11116
11141
|
"class": "footer-min",
|
|
11117
11142
|
"id": "footer_" + uuid.value
|
|
11118
11143
|
}, [createVNode("div", {
|
|
@@ -11258,7 +11283,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
11258
11283
|
return createVNode("img", {
|
|
11259
11284
|
"onClick": e => {
|
|
11260
11285
|
e.stopPropagation();
|
|
11261
|
-
|
|
11286
|
+
toggle();
|
|
11262
11287
|
},
|
|
11263
11288
|
"src": "/micro-assets/inl/video/putUp.png"
|
|
11264
11289
|
}, null);
|
|
@@ -11271,7 +11296,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
11271
11296
|
}, null);
|
|
11272
11297
|
}
|
|
11273
11298
|
}
|
|
11274
|
-
})])]), renderChangeCamera()]);
|
|
11299
|
+
})])]), [[vShow, !isFullscreen.value]]), renderChangeCamera()]);
|
|
11275
11300
|
}
|
|
11276
11301
|
});
|
|
11277
11302
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|
package/dist/video/index.cjs
CHANGED
|
@@ -6742,6 +6742,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6742
6742
|
},
|
|
6743
6743
|
emits: ["close", "change"],
|
|
6744
6744
|
setup(_prop, _context) {
|
|
6745
|
+
const videoBoxRef = vue.ref();
|
|
6745
6746
|
const player = vue.ref();
|
|
6746
6747
|
const cameraConfig = vue.ref({});
|
|
6747
6748
|
const streamHistory = vue.ref("");
|
|
@@ -7033,6 +7034,15 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7033
7034
|
};
|
|
7034
7035
|
let Mqtt = null;
|
|
7035
7036
|
const topic = vue.ref("");
|
|
7037
|
+
const {
|
|
7038
|
+
isFullscreen,
|
|
7039
|
+
enter,
|
|
7040
|
+
exit,
|
|
7041
|
+
toggle
|
|
7042
|
+
} = core.useFullscreen(videoBoxRef);
|
|
7043
|
+
vue.watch(() => isFullscreen.value, val => {
|
|
7044
|
+
clearFlogCanvas();
|
|
7045
|
+
});
|
|
7036
7046
|
const initMqtt = async ip => {
|
|
7037
7047
|
Mqtt = await useMqtt();
|
|
7038
7048
|
topic.value = `vlm/${ip}`;
|
|
@@ -7074,7 +7084,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7074
7084
|
textBox.style.position = "absolute";
|
|
7075
7085
|
textBox.style.width = "100%";
|
|
7076
7086
|
textBox.style.left = "0";
|
|
7077
|
-
textBox.style.zIndex = "
|
|
7087
|
+
textBox.style.zIndex = "1000";
|
|
7078
7088
|
textBox.style.pointerEvents = "none";
|
|
7079
7089
|
box.appendChild(textBox);
|
|
7080
7090
|
}
|
|
@@ -7085,6 +7095,20 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7085
7095
|
height: box.offsetHeight
|
|
7086
7096
|
};
|
|
7087
7097
|
};
|
|
7098
|
+
const clearFlogCanvas = () => {
|
|
7099
|
+
if (canvasDom) {
|
|
7100
|
+
canvasDom.remove();
|
|
7101
|
+
canvasDom = null;
|
|
7102
|
+
}
|
|
7103
|
+
if (textBox) {
|
|
7104
|
+
textBox.remove();
|
|
7105
|
+
textBox = null;
|
|
7106
|
+
}
|
|
7107
|
+
if (drawCleanTimer) {
|
|
7108
|
+
clearTimeout(drawCleanTimer);
|
|
7109
|
+
drawCleanTimer = null;
|
|
7110
|
+
}
|
|
7111
|
+
};
|
|
7088
7112
|
let drawCleanTimer = null;
|
|
7089
7113
|
const drawFlog = data => {
|
|
7090
7114
|
let {
|
|
@@ -7109,12 +7133,12 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7109
7133
|
});
|
|
7110
7134
|
}
|
|
7111
7135
|
if (data.text) {
|
|
7112
|
-
const fontSize =
|
|
7136
|
+
const fontSize = 16 * width / 800;
|
|
7113
7137
|
const margin = 10;
|
|
7114
7138
|
const marginTop = height * 0.1 + margin;
|
|
7115
7139
|
textBox2.innerHTML = data.text;
|
|
7116
7140
|
textBox2.style.top = marginTop + "px";
|
|
7117
|
-
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.
|
|
7141
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.8)";
|
|
7118
7142
|
textBox2.style.color = data.text_color || "red";
|
|
7119
7143
|
textBox2.style.fontSize = `${fontSize}px`;
|
|
7120
7144
|
textBox2.style.padding = `${margin}px`;
|
|
@@ -7153,7 +7177,8 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7153
7177
|
});
|
|
7154
7178
|
return () => vue.createVNode("div", {
|
|
7155
7179
|
"id": "videoBox_" + uuid.value,
|
|
7156
|
-
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
7180
|
+
"class": ["videoBox", _prop.alarm ? "alarm" : ""],
|
|
7181
|
+
"ref": videoBoxRef
|
|
7157
7182
|
}, [camera.value ? vue.createVNode(VideoPlayerV2, {
|
|
7158
7183
|
"ref": player,
|
|
7159
7184
|
"domId": uuid.value,
|
|
@@ -7196,7 +7221,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7196
7221
|
}, [vue.createVNode("div", null, [info.name ? `${info.name}\uFF1A` : ""]), vue.createVNode("div", {
|
|
7197
7222
|
"class": "value"
|
|
7198
7223
|
}, [info.displayValue && info.displayValue !== "null" ? info.displayValue + " " : ""]), vue.createVNode("div", null, [info.unit])]);
|
|
7199
|
-
})]) : "", vue.createVNode("div", {
|
|
7224
|
+
})]) : "", vue.withDirectives(vue.createVNode("div", {
|
|
7200
7225
|
"class": "footer-min",
|
|
7201
7226
|
"id": "footer_" + uuid.value
|
|
7202
7227
|
}, [vue.createVNode("div", {
|
|
@@ -7342,7 +7367,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7342
7367
|
return vue.createVNode("img", {
|
|
7343
7368
|
"onClick": e => {
|
|
7344
7369
|
e.stopPropagation();
|
|
7345
|
-
|
|
7370
|
+
toggle();
|
|
7346
7371
|
},
|
|
7347
7372
|
"src": "/micro-assets/inl/video/putUp.png"
|
|
7348
7373
|
}, null);
|
|
@@ -7355,7 +7380,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
7355
7380
|
}, null);
|
|
7356
7381
|
}
|
|
7357
7382
|
}
|
|
7358
|
-
})])]), renderChangeCamera()]);
|
|
7383
|
+
})])]), [[vue.vShow, !isFullscreen.value]]), renderChangeCamera()]);
|
|
7359
7384
|
}
|
|
7360
7385
|
});
|
|
7361
7386
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|
package/dist/video/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, defineComponent, reactive, watchEffect, watch, onBeforeUnmount, createVNode, Fragment, toRefs, resolveComponent, onMounted, withDirectives, vShow, isVNode, computed, shallowRef, onBeforeMount, nextTick } from 'vue';
|
|
2
2
|
import { SearchOutlined, FullscreenOutlined, createFromIconfontCN } from '@ant-design/icons-vue';
|
|
3
3
|
import axios$2 from 'axios';
|
|
4
|
-
import { resolveRef } from '@vueuse/core';
|
|
4
|
+
import { resolveRef, useFullscreen } from '@vueuse/core';
|
|
5
5
|
import { cloneDeep } from 'lodash';
|
|
6
6
|
import mqtt from 'mqtt';
|
|
7
7
|
import { useRouter } from 'vue-router';
|
|
@@ -6715,6 +6715,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
6715
6715
|
},
|
|
6716
6716
|
emits: ["close", "change"],
|
|
6717
6717
|
setup(_prop, _context) {
|
|
6718
|
+
const videoBoxRef = ref();
|
|
6718
6719
|
const player = ref();
|
|
6719
6720
|
const cameraConfig = ref({});
|
|
6720
6721
|
const streamHistory = ref("");
|
|
@@ -7006,6 +7007,15 @@ const VideoBoxV2 = defineComponent({
|
|
|
7006
7007
|
};
|
|
7007
7008
|
let Mqtt = null;
|
|
7008
7009
|
const topic = ref("");
|
|
7010
|
+
const {
|
|
7011
|
+
isFullscreen,
|
|
7012
|
+
enter,
|
|
7013
|
+
exit,
|
|
7014
|
+
toggle
|
|
7015
|
+
} = useFullscreen(videoBoxRef);
|
|
7016
|
+
watch(() => isFullscreen.value, val => {
|
|
7017
|
+
clearFlogCanvas();
|
|
7018
|
+
});
|
|
7009
7019
|
const initMqtt = async ip => {
|
|
7010
7020
|
Mqtt = await useMqtt();
|
|
7011
7021
|
topic.value = `vlm/${ip}`;
|
|
@@ -7047,7 +7057,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
7047
7057
|
textBox.style.position = "absolute";
|
|
7048
7058
|
textBox.style.width = "100%";
|
|
7049
7059
|
textBox.style.left = "0";
|
|
7050
|
-
textBox.style.zIndex = "
|
|
7060
|
+
textBox.style.zIndex = "1000";
|
|
7051
7061
|
textBox.style.pointerEvents = "none";
|
|
7052
7062
|
box.appendChild(textBox);
|
|
7053
7063
|
}
|
|
@@ -7058,6 +7068,20 @@ const VideoBoxV2 = defineComponent({
|
|
|
7058
7068
|
height: box.offsetHeight
|
|
7059
7069
|
};
|
|
7060
7070
|
};
|
|
7071
|
+
const clearFlogCanvas = () => {
|
|
7072
|
+
if (canvasDom) {
|
|
7073
|
+
canvasDom.remove();
|
|
7074
|
+
canvasDom = null;
|
|
7075
|
+
}
|
|
7076
|
+
if (textBox) {
|
|
7077
|
+
textBox.remove();
|
|
7078
|
+
textBox = null;
|
|
7079
|
+
}
|
|
7080
|
+
if (drawCleanTimer) {
|
|
7081
|
+
clearTimeout(drawCleanTimer);
|
|
7082
|
+
drawCleanTimer = null;
|
|
7083
|
+
}
|
|
7084
|
+
};
|
|
7061
7085
|
let drawCleanTimer = null;
|
|
7062
7086
|
const drawFlog = data => {
|
|
7063
7087
|
let {
|
|
@@ -7082,12 +7106,12 @@ const VideoBoxV2 = defineComponent({
|
|
|
7082
7106
|
});
|
|
7083
7107
|
}
|
|
7084
7108
|
if (data.text) {
|
|
7085
|
-
const fontSize =
|
|
7109
|
+
const fontSize = 16 * width / 800;
|
|
7086
7110
|
const margin = 10;
|
|
7087
7111
|
const marginTop = height * 0.1 + margin;
|
|
7088
7112
|
textBox2.innerHTML = data.text;
|
|
7089
7113
|
textBox2.style.top = marginTop + "px";
|
|
7090
|
-
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.
|
|
7114
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.8)";
|
|
7091
7115
|
textBox2.style.color = data.text_color || "red";
|
|
7092
7116
|
textBox2.style.fontSize = `${fontSize}px`;
|
|
7093
7117
|
textBox2.style.padding = `${margin}px`;
|
|
@@ -7126,7 +7150,8 @@ const VideoBoxV2 = defineComponent({
|
|
|
7126
7150
|
});
|
|
7127
7151
|
return () => createVNode("div", {
|
|
7128
7152
|
"id": "videoBox_" + uuid.value,
|
|
7129
|
-
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
7153
|
+
"class": ["videoBox", _prop.alarm ? "alarm" : ""],
|
|
7154
|
+
"ref": videoBoxRef
|
|
7130
7155
|
}, [camera.value ? createVNode(VideoPlayerV2, {
|
|
7131
7156
|
"ref": player,
|
|
7132
7157
|
"domId": uuid.value,
|
|
@@ -7169,7 +7194,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
7169
7194
|
}, [createVNode("div", null, [info.name ? `${info.name}\uFF1A` : ""]), createVNode("div", {
|
|
7170
7195
|
"class": "value"
|
|
7171
7196
|
}, [info.displayValue && info.displayValue !== "null" ? info.displayValue + " " : ""]), createVNode("div", null, [info.unit])]);
|
|
7172
|
-
})]) : "", createVNode("div", {
|
|
7197
|
+
})]) : "", withDirectives(createVNode("div", {
|
|
7173
7198
|
"class": "footer-min",
|
|
7174
7199
|
"id": "footer_" + uuid.value
|
|
7175
7200
|
}, [createVNode("div", {
|
|
@@ -7315,7 +7340,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
7315
7340
|
return createVNode("img", {
|
|
7316
7341
|
"onClick": e => {
|
|
7317
7342
|
e.stopPropagation();
|
|
7318
|
-
|
|
7343
|
+
toggle();
|
|
7319
7344
|
},
|
|
7320
7345
|
"src": "/micro-assets/inl/video/putUp.png"
|
|
7321
7346
|
}, null);
|
|
@@ -7328,7 +7353,7 @@ const VideoBoxV2 = defineComponent({
|
|
|
7328
7353
|
}, null);
|
|
7329
7354
|
}
|
|
7330
7355
|
}
|
|
7331
|
-
})])]), renderChangeCamera()]);
|
|
7356
|
+
})])]), [[vShow, !isFullscreen.value]]), renderChangeCamera()]);
|
|
7332
7357
|
}
|
|
7333
7358
|
});
|
|
7334
7359
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|