inl-ui 0.1.40 → 0.1.41
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 +30 -10
- package/dist/components/index.js +30 -10
- package/dist/index.cjs +31 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +31 -11
- package/dist/video/index.cjs +30 -10
- package/dist/video/index.js +30 -10
- package/package.json +1 -1
|
@@ -9302,7 +9302,9 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9302
9302
|
top: 0
|
|
9303
9303
|
};
|
|
9304
9304
|
let mousedownEvent;
|
|
9305
|
-
|
|
9305
|
+
let mousemoveEvent;
|
|
9306
|
+
const mousemoveFun = e => {
|
|
9307
|
+
mousemoveEvent = e;
|
|
9306
9308
|
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
|
|
9307
9309
|
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
|
|
9308
9310
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
@@ -9310,6 +9312,9 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9310
9312
|
};
|
|
9311
9313
|
const mousedownFun = e => {
|
|
9312
9314
|
mousedownEvent = e;
|
|
9315
|
+
if (mousedownEvent.target.localName !== "video") {
|
|
9316
|
+
return;
|
|
9317
|
+
}
|
|
9313
9318
|
begin.left = Number(playerDom.style.left.split("px")[0]);
|
|
9314
9319
|
begin.top = Number(playerDom.style.top.split("px")[0]);
|
|
9315
9320
|
newDiv = document.createElement("div");
|
|
@@ -9317,15 +9322,23 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9317
9322
|
newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
|
|
9318
9323
|
newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
|
|
9319
9324
|
boxDom.appendChild(newDiv);
|
|
9325
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9326
|
+
thumbnailDom.style.display = "none";
|
|
9320
9327
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
9321
9328
|
};
|
|
9322
9329
|
const mouseupFun = mouseupEvent => {
|
|
9330
|
+
const tempDiv = document.getElementById("tempDiv");
|
|
9331
|
+
if (!tempDiv) {
|
|
9332
|
+
return;
|
|
9333
|
+
}
|
|
9323
9334
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
9324
9335
|
newDiv.remove();
|
|
9325
|
-
const
|
|
9326
|
-
|
|
9327
|
-
const
|
|
9328
|
-
const
|
|
9336
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9337
|
+
thumbnailDom.style.display = "inline";
|
|
9338
|
+
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
9339
|
+
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
9340
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) * -1 / scaleX;
|
|
9341
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) * -1 / scaleY;
|
|
9329
9342
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
9330
9343
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
9331
9344
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -9335,7 +9348,6 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9335
9348
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
9336
9349
|
chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
|
|
9337
9350
|
chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
|
|
9338
|
-
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9339
9351
|
chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
|
|
9340
9352
|
chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
|
|
9341
9353
|
};
|
|
@@ -9345,17 +9357,24 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9345
9357
|
if (magnifyBtn.value) {
|
|
9346
9358
|
magnifyBtn.value = !magnifyBtn.value;
|
|
9347
9359
|
playerDom?.removeEventListener("mousedown", mousedownFun);
|
|
9348
|
-
|
|
9360
|
+
document?.removeEventListener("mouseup", mouseupFun);
|
|
9349
9361
|
resetZoom();
|
|
9350
9362
|
return;
|
|
9351
9363
|
}
|
|
9352
9364
|
magnifyBtn.value = !magnifyBtn.value;
|
|
9353
|
-
playerDom?.addEventListener("mousedown", mousedownFun
|
|
9354
|
-
|
|
9365
|
+
playerDom?.addEventListener("mousedown", mousedownFun, {
|
|
9366
|
+
capture: true
|
|
9367
|
+
});
|
|
9368
|
+
document?.addEventListener("mouseup", mouseupFun, {
|
|
9369
|
+
capture: true
|
|
9370
|
+
});
|
|
9355
9371
|
};
|
|
9356
9372
|
const fill = vue.ref("fill");
|
|
9357
9373
|
vue.watch(() => _prop.camera, val => {
|
|
9358
9374
|
if (val && Object.keys(val).length != 0) {
|
|
9375
|
+
if (magnifyBtn.value) {
|
|
9376
|
+
setZoom();
|
|
9377
|
+
}
|
|
9359
9378
|
camera.value = void 0;
|
|
9360
9379
|
getVideoParams(val);
|
|
9361
9380
|
getVideoDetail(val);
|
|
@@ -9430,7 +9449,8 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9430
9449
|
}, [vue.createVNode("div", {
|
|
9431
9450
|
"class": "name-min"
|
|
9432
9451
|
}, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
|
|
9433
|
-
"class": "tool"
|
|
9452
|
+
"class": "tool",
|
|
9453
|
+
"onClick": () => {}
|
|
9434
9454
|
}, [_prop.btns.map(btn => {
|
|
9435
9455
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
9436
9456
|
switch (btn) {
|
package/dist/components/index.js
CHANGED
|
@@ -9291,7 +9291,9 @@ const VideoBoxV2 = defineComponent({
|
|
|
9291
9291
|
top: 0
|
|
9292
9292
|
};
|
|
9293
9293
|
let mousedownEvent;
|
|
9294
|
-
|
|
9294
|
+
let mousemoveEvent;
|
|
9295
|
+
const mousemoveFun = e => {
|
|
9296
|
+
mousemoveEvent = e;
|
|
9295
9297
|
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
|
|
9296
9298
|
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
|
|
9297
9299
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
@@ -9299,6 +9301,9 @@ const VideoBoxV2 = defineComponent({
|
|
|
9299
9301
|
};
|
|
9300
9302
|
const mousedownFun = e => {
|
|
9301
9303
|
mousedownEvent = e;
|
|
9304
|
+
if (mousedownEvent.target.localName !== "video") {
|
|
9305
|
+
return;
|
|
9306
|
+
}
|
|
9302
9307
|
begin.left = Number(playerDom.style.left.split("px")[0]);
|
|
9303
9308
|
begin.top = Number(playerDom.style.top.split("px")[0]);
|
|
9304
9309
|
newDiv = document.createElement("div");
|
|
@@ -9306,15 +9311,23 @@ const VideoBoxV2 = defineComponent({
|
|
|
9306
9311
|
newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
|
|
9307
9312
|
newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
|
|
9308
9313
|
boxDom.appendChild(newDiv);
|
|
9314
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9315
|
+
thumbnailDom.style.display = "none";
|
|
9309
9316
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
9310
9317
|
};
|
|
9311
9318
|
const mouseupFun = mouseupEvent => {
|
|
9319
|
+
const tempDiv = document.getElementById("tempDiv");
|
|
9320
|
+
if (!tempDiv) {
|
|
9321
|
+
return;
|
|
9322
|
+
}
|
|
9312
9323
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
9313
9324
|
newDiv.remove();
|
|
9314
|
-
const
|
|
9315
|
-
|
|
9316
|
-
const
|
|
9317
|
-
const
|
|
9325
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9326
|
+
thumbnailDom.style.display = "inline";
|
|
9327
|
+
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
9328
|
+
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
9329
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) * -1 / scaleX;
|
|
9330
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) * -1 / scaleY;
|
|
9318
9331
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
9319
9332
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
9320
9333
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -9324,7 +9337,6 @@ const VideoBoxV2 = defineComponent({
|
|
|
9324
9337
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
9325
9338
|
chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
|
|
9326
9339
|
chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
|
|
9327
|
-
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9328
9340
|
chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
|
|
9329
9341
|
chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
|
|
9330
9342
|
};
|
|
@@ -9334,17 +9346,24 @@ const VideoBoxV2 = defineComponent({
|
|
|
9334
9346
|
if (magnifyBtn.value) {
|
|
9335
9347
|
magnifyBtn.value = !magnifyBtn.value;
|
|
9336
9348
|
playerDom?.removeEventListener("mousedown", mousedownFun);
|
|
9337
|
-
|
|
9349
|
+
document?.removeEventListener("mouseup", mouseupFun);
|
|
9338
9350
|
resetZoom();
|
|
9339
9351
|
return;
|
|
9340
9352
|
}
|
|
9341
9353
|
magnifyBtn.value = !magnifyBtn.value;
|
|
9342
|
-
playerDom?.addEventListener("mousedown", mousedownFun
|
|
9343
|
-
|
|
9354
|
+
playerDom?.addEventListener("mousedown", mousedownFun, {
|
|
9355
|
+
capture: true
|
|
9356
|
+
});
|
|
9357
|
+
document?.addEventListener("mouseup", mouseupFun, {
|
|
9358
|
+
capture: true
|
|
9359
|
+
});
|
|
9344
9360
|
};
|
|
9345
9361
|
const fill = ref("fill");
|
|
9346
9362
|
watch(() => _prop.camera, val => {
|
|
9347
9363
|
if (val && Object.keys(val).length != 0) {
|
|
9364
|
+
if (magnifyBtn.value) {
|
|
9365
|
+
setZoom();
|
|
9366
|
+
}
|
|
9348
9367
|
camera.value = void 0;
|
|
9349
9368
|
getVideoParams(val);
|
|
9350
9369
|
getVideoDetail(val);
|
|
@@ -9419,7 +9438,8 @@ const VideoBoxV2 = defineComponent({
|
|
|
9419
9438
|
}, [createVNode("div", {
|
|
9420
9439
|
"class": "name-min"
|
|
9421
9440
|
}, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
|
|
9422
|
-
"class": "tool"
|
|
9441
|
+
"class": "tool",
|
|
9442
|
+
"onClick": () => {}
|
|
9423
9443
|
}, [_prop.btns.map(btn => {
|
|
9424
9444
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
9425
9445
|
switch (btn) {
|
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
|
45
45
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
46
46
|
var EZUIKit__default = /*#__PURE__*/_interopDefaultLegacy(EZUIKit);
|
|
47
47
|
|
|
48
|
-
var version = "0.1.
|
|
48
|
+
var version = "0.1.40";
|
|
49
49
|
|
|
50
50
|
const setTheme = theme => {
|
|
51
51
|
if (theme === "dark") {
|
|
@@ -10306,7 +10306,9 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10306
10306
|
top: 0
|
|
10307
10307
|
};
|
|
10308
10308
|
let mousedownEvent;
|
|
10309
|
-
|
|
10309
|
+
let mousemoveEvent;
|
|
10310
|
+
const mousemoveFun = e => {
|
|
10311
|
+
mousemoveEvent = e;
|
|
10310
10312
|
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
|
|
10311
10313
|
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
|
|
10312
10314
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
@@ -10314,6 +10316,9 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10314
10316
|
};
|
|
10315
10317
|
const mousedownFun = e => {
|
|
10316
10318
|
mousedownEvent = e;
|
|
10319
|
+
if (mousedownEvent.target.localName !== "video") {
|
|
10320
|
+
return;
|
|
10321
|
+
}
|
|
10317
10322
|
begin.left = Number(playerDom.style.left.split("px")[0]);
|
|
10318
10323
|
begin.top = Number(playerDom.style.top.split("px")[0]);
|
|
10319
10324
|
newDiv = document.createElement("div");
|
|
@@ -10321,15 +10326,23 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10321
10326
|
newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
|
|
10322
10327
|
newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
|
|
10323
10328
|
boxDom.appendChild(newDiv);
|
|
10329
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
10330
|
+
thumbnailDom.style.display = "none";
|
|
10324
10331
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
10325
10332
|
};
|
|
10326
10333
|
const mouseupFun = mouseupEvent => {
|
|
10334
|
+
const tempDiv = document.getElementById("tempDiv");
|
|
10335
|
+
if (!tempDiv) {
|
|
10336
|
+
return;
|
|
10337
|
+
}
|
|
10327
10338
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
10328
10339
|
newDiv.remove();
|
|
10329
|
-
const
|
|
10330
|
-
|
|
10331
|
-
const
|
|
10332
|
-
const
|
|
10340
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
10341
|
+
thumbnailDom.style.display = "inline";
|
|
10342
|
+
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
10343
|
+
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
10344
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) * -1 / scaleX;
|
|
10345
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) * -1 / scaleY;
|
|
10333
10346
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
10334
10347
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
10335
10348
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -10339,7 +10352,6 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10339
10352
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
10340
10353
|
chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
|
|
10341
10354
|
chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
|
|
10342
|
-
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
10343
10355
|
chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
|
|
10344
10356
|
chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
|
|
10345
10357
|
};
|
|
@@ -10349,17 +10361,24 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10349
10361
|
if (magnifyBtn.value) {
|
|
10350
10362
|
magnifyBtn.value = !magnifyBtn.value;
|
|
10351
10363
|
playerDom?.removeEventListener("mousedown", mousedownFun);
|
|
10352
|
-
|
|
10364
|
+
document?.removeEventListener("mouseup", mouseupFun);
|
|
10353
10365
|
resetZoom();
|
|
10354
10366
|
return;
|
|
10355
10367
|
}
|
|
10356
10368
|
magnifyBtn.value = !magnifyBtn.value;
|
|
10357
|
-
playerDom?.addEventListener("mousedown", mousedownFun
|
|
10358
|
-
|
|
10369
|
+
playerDom?.addEventListener("mousedown", mousedownFun, {
|
|
10370
|
+
capture: true
|
|
10371
|
+
});
|
|
10372
|
+
document?.addEventListener("mouseup", mouseupFun, {
|
|
10373
|
+
capture: true
|
|
10374
|
+
});
|
|
10359
10375
|
};
|
|
10360
10376
|
const fill = vue.ref("fill");
|
|
10361
10377
|
vue.watch(() => _prop.camera, val => {
|
|
10362
10378
|
if (val && Object.keys(val).length != 0) {
|
|
10379
|
+
if (magnifyBtn.value) {
|
|
10380
|
+
setZoom();
|
|
10381
|
+
}
|
|
10363
10382
|
camera.value = void 0;
|
|
10364
10383
|
getVideoParams(val);
|
|
10365
10384
|
getVideoDetail(val);
|
|
@@ -10434,7 +10453,8 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
10434
10453
|
}, [vue.createVNode("div", {
|
|
10435
10454
|
"class": "name-min"
|
|
10436
10455
|
}, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
|
|
10437
|
-
"class": "tool"
|
|
10456
|
+
"class": "tool",
|
|
10457
|
+
"onClick": () => {}
|
|
10438
10458
|
}, [_prop.btns.map(btn => {
|
|
10439
10459
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
10440
10460
|
switch (btn) {
|
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.40";
|
|
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.40";
|
|
18
18
|
|
|
19
19
|
const setTheme = theme => {
|
|
20
20
|
if (theme === "dark") {
|
|
@@ -10275,7 +10275,9 @@ const VideoBoxV2 = defineComponent({
|
|
|
10275
10275
|
top: 0
|
|
10276
10276
|
};
|
|
10277
10277
|
let mousedownEvent;
|
|
10278
|
-
|
|
10278
|
+
let mousemoveEvent;
|
|
10279
|
+
const mousemoveFun = e => {
|
|
10280
|
+
mousemoveEvent = e;
|
|
10279
10281
|
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
|
|
10280
10282
|
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
|
|
10281
10283
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
@@ -10283,6 +10285,9 @@ const VideoBoxV2 = defineComponent({
|
|
|
10283
10285
|
};
|
|
10284
10286
|
const mousedownFun = e => {
|
|
10285
10287
|
mousedownEvent = e;
|
|
10288
|
+
if (mousedownEvent.target.localName !== "video") {
|
|
10289
|
+
return;
|
|
10290
|
+
}
|
|
10286
10291
|
begin.left = Number(playerDom.style.left.split("px")[0]);
|
|
10287
10292
|
begin.top = Number(playerDom.style.top.split("px")[0]);
|
|
10288
10293
|
newDiv = document.createElement("div");
|
|
@@ -10290,15 +10295,23 @@ const VideoBoxV2 = defineComponent({
|
|
|
10290
10295
|
newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
|
|
10291
10296
|
newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
|
|
10292
10297
|
boxDom.appendChild(newDiv);
|
|
10298
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
10299
|
+
thumbnailDom.style.display = "none";
|
|
10293
10300
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
10294
10301
|
};
|
|
10295
10302
|
const mouseupFun = mouseupEvent => {
|
|
10303
|
+
const tempDiv = document.getElementById("tempDiv");
|
|
10304
|
+
if (!tempDiv) {
|
|
10305
|
+
return;
|
|
10306
|
+
}
|
|
10296
10307
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
10297
10308
|
newDiv.remove();
|
|
10298
|
-
const
|
|
10299
|
-
|
|
10300
|
-
const
|
|
10301
|
-
const
|
|
10309
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
10310
|
+
thumbnailDom.style.display = "inline";
|
|
10311
|
+
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
10312
|
+
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
10313
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) * -1 / scaleX;
|
|
10314
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) * -1 / scaleY;
|
|
10302
10315
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
10303
10316
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
10304
10317
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -10308,7 +10321,6 @@ const VideoBoxV2 = defineComponent({
|
|
|
10308
10321
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
10309
10322
|
chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
|
|
10310
10323
|
chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
|
|
10311
|
-
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
10312
10324
|
chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
|
|
10313
10325
|
chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
|
|
10314
10326
|
};
|
|
@@ -10318,17 +10330,24 @@ const VideoBoxV2 = defineComponent({
|
|
|
10318
10330
|
if (magnifyBtn.value) {
|
|
10319
10331
|
magnifyBtn.value = !magnifyBtn.value;
|
|
10320
10332
|
playerDom?.removeEventListener("mousedown", mousedownFun);
|
|
10321
|
-
|
|
10333
|
+
document?.removeEventListener("mouseup", mouseupFun);
|
|
10322
10334
|
resetZoom();
|
|
10323
10335
|
return;
|
|
10324
10336
|
}
|
|
10325
10337
|
magnifyBtn.value = !magnifyBtn.value;
|
|
10326
|
-
playerDom?.addEventListener("mousedown", mousedownFun
|
|
10327
|
-
|
|
10338
|
+
playerDom?.addEventListener("mousedown", mousedownFun, {
|
|
10339
|
+
capture: true
|
|
10340
|
+
});
|
|
10341
|
+
document?.addEventListener("mouseup", mouseupFun, {
|
|
10342
|
+
capture: true
|
|
10343
|
+
});
|
|
10328
10344
|
};
|
|
10329
10345
|
const fill = ref("fill");
|
|
10330
10346
|
watch(() => _prop.camera, val => {
|
|
10331
10347
|
if (val && Object.keys(val).length != 0) {
|
|
10348
|
+
if (magnifyBtn.value) {
|
|
10349
|
+
setZoom();
|
|
10350
|
+
}
|
|
10332
10351
|
camera.value = void 0;
|
|
10333
10352
|
getVideoParams(val);
|
|
10334
10353
|
getVideoDetail(val);
|
|
@@ -10403,7 +10422,8 @@ const VideoBoxV2 = defineComponent({
|
|
|
10403
10422
|
}, [createVNode("div", {
|
|
10404
10423
|
"class": "name-min"
|
|
10405
10424
|
}, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
|
|
10406
|
-
"class": "tool"
|
|
10425
|
+
"class": "tool",
|
|
10426
|
+
"onClick": () => {}
|
|
10407
10427
|
}, [_prop.btns.map(btn => {
|
|
10408
10428
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
10409
10429
|
switch (btn) {
|
package/dist/video/index.cjs
CHANGED
|
@@ -6493,7 +6493,9 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6493
6493
|
top: 0
|
|
6494
6494
|
};
|
|
6495
6495
|
let mousedownEvent;
|
|
6496
|
-
|
|
6496
|
+
let mousemoveEvent;
|
|
6497
|
+
const mousemoveFun = e => {
|
|
6498
|
+
mousemoveEvent = e;
|
|
6497
6499
|
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
|
|
6498
6500
|
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
|
|
6499
6501
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
@@ -6501,6 +6503,9 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6501
6503
|
};
|
|
6502
6504
|
const mousedownFun = e => {
|
|
6503
6505
|
mousedownEvent = e;
|
|
6506
|
+
if (mousedownEvent.target.localName !== "video") {
|
|
6507
|
+
return;
|
|
6508
|
+
}
|
|
6504
6509
|
begin.left = Number(playerDom.style.left.split("px")[0]);
|
|
6505
6510
|
begin.top = Number(playerDom.style.top.split("px")[0]);
|
|
6506
6511
|
newDiv = document.createElement("div");
|
|
@@ -6508,15 +6513,23 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6508
6513
|
newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
|
|
6509
6514
|
newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
|
|
6510
6515
|
boxDom.appendChild(newDiv);
|
|
6516
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
6517
|
+
thumbnailDom.style.display = "none";
|
|
6511
6518
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
6512
6519
|
};
|
|
6513
6520
|
const mouseupFun = mouseupEvent => {
|
|
6521
|
+
const tempDiv = document.getElementById("tempDiv");
|
|
6522
|
+
if (!tempDiv) {
|
|
6523
|
+
return;
|
|
6524
|
+
}
|
|
6514
6525
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
6515
6526
|
newDiv.remove();
|
|
6516
|
-
const
|
|
6517
|
-
|
|
6518
|
-
const
|
|
6519
|
-
const
|
|
6527
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
6528
|
+
thumbnailDom.style.display = "inline";
|
|
6529
|
+
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
6530
|
+
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
6531
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) * -1 / scaleX;
|
|
6532
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) * -1 / scaleY;
|
|
6520
6533
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
6521
6534
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
6522
6535
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -6526,7 +6539,6 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6526
6539
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
6527
6540
|
chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
|
|
6528
6541
|
chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
|
|
6529
|
-
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
6530
6542
|
chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
|
|
6531
6543
|
chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
|
|
6532
6544
|
};
|
|
@@ -6536,17 +6548,24 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6536
6548
|
if (magnifyBtn.value) {
|
|
6537
6549
|
magnifyBtn.value = !magnifyBtn.value;
|
|
6538
6550
|
playerDom?.removeEventListener("mousedown", mousedownFun);
|
|
6539
|
-
|
|
6551
|
+
document?.removeEventListener("mouseup", mouseupFun);
|
|
6540
6552
|
resetZoom();
|
|
6541
6553
|
return;
|
|
6542
6554
|
}
|
|
6543
6555
|
magnifyBtn.value = !magnifyBtn.value;
|
|
6544
|
-
playerDom?.addEventListener("mousedown", mousedownFun
|
|
6545
|
-
|
|
6556
|
+
playerDom?.addEventListener("mousedown", mousedownFun, {
|
|
6557
|
+
capture: true
|
|
6558
|
+
});
|
|
6559
|
+
document?.addEventListener("mouseup", mouseupFun, {
|
|
6560
|
+
capture: true
|
|
6561
|
+
});
|
|
6546
6562
|
};
|
|
6547
6563
|
const fill = vue.ref("fill");
|
|
6548
6564
|
vue.watch(() => _prop.camera, val => {
|
|
6549
6565
|
if (val && Object.keys(val).length != 0) {
|
|
6566
|
+
if (magnifyBtn.value) {
|
|
6567
|
+
setZoom();
|
|
6568
|
+
}
|
|
6550
6569
|
camera.value = void 0;
|
|
6551
6570
|
getVideoParams(val);
|
|
6552
6571
|
getVideoDetail(val);
|
|
@@ -6621,7 +6640,8 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
6621
6640
|
}, [vue.createVNode("div", {
|
|
6622
6641
|
"class": "name-min"
|
|
6623
6642
|
}, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
|
|
6624
|
-
"class": "tool"
|
|
6643
|
+
"class": "tool",
|
|
6644
|
+
"onClick": () => {}
|
|
6625
6645
|
}, [_prop.btns.map(btn => {
|
|
6626
6646
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
6627
6647
|
switch (btn) {
|
package/dist/video/index.js
CHANGED
|
@@ -6484,7 +6484,9 @@ const VideoBoxV2 = defineComponent({
|
|
|
6484
6484
|
top: 0
|
|
6485
6485
|
};
|
|
6486
6486
|
let mousedownEvent;
|
|
6487
|
-
|
|
6487
|
+
let mousemoveEvent;
|
|
6488
|
+
const mousemoveFun = e => {
|
|
6489
|
+
mousemoveEvent = e;
|
|
6488
6490
|
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
|
|
6489
6491
|
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
|
|
6490
6492
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
@@ -6492,6 +6494,9 @@ const VideoBoxV2 = defineComponent({
|
|
|
6492
6494
|
};
|
|
6493
6495
|
const mousedownFun = e => {
|
|
6494
6496
|
mousedownEvent = e;
|
|
6497
|
+
if (mousedownEvent.target.localName !== "video") {
|
|
6498
|
+
return;
|
|
6499
|
+
}
|
|
6495
6500
|
begin.left = Number(playerDom.style.left.split("px")[0]);
|
|
6496
6501
|
begin.top = Number(playerDom.style.top.split("px")[0]);
|
|
6497
6502
|
newDiv = document.createElement("div");
|
|
@@ -6499,15 +6504,23 @@ const VideoBoxV2 = defineComponent({
|
|
|
6499
6504
|
newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
|
|
6500
6505
|
newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
|
|
6501
6506
|
boxDom.appendChild(newDiv);
|
|
6507
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
6508
|
+
thumbnailDom.style.display = "none";
|
|
6502
6509
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
6503
6510
|
};
|
|
6504
6511
|
const mouseupFun = mouseupEvent => {
|
|
6512
|
+
const tempDiv = document.getElementById("tempDiv");
|
|
6513
|
+
if (!tempDiv) {
|
|
6514
|
+
return;
|
|
6515
|
+
}
|
|
6505
6516
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
6506
6517
|
newDiv.remove();
|
|
6507
|
-
const
|
|
6508
|
-
|
|
6509
|
-
const
|
|
6510
|
-
const
|
|
6518
|
+
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
6519
|
+
thumbnailDom.style.display = "inline";
|
|
6520
|
+
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
6521
|
+
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
6522
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) * -1 / scaleX;
|
|
6523
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) * -1 / scaleY;
|
|
6511
6524
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
6512
6525
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
6513
6526
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -6517,7 +6530,6 @@ const VideoBoxV2 = defineComponent({
|
|
|
6517
6530
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
6518
6531
|
chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
|
|
6519
6532
|
chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
|
|
6520
|
-
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
6521
6533
|
chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
|
|
6522
6534
|
chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
|
|
6523
6535
|
};
|
|
@@ -6527,17 +6539,24 @@ const VideoBoxV2 = defineComponent({
|
|
|
6527
6539
|
if (magnifyBtn.value) {
|
|
6528
6540
|
magnifyBtn.value = !magnifyBtn.value;
|
|
6529
6541
|
playerDom?.removeEventListener("mousedown", mousedownFun);
|
|
6530
|
-
|
|
6542
|
+
document?.removeEventListener("mouseup", mouseupFun);
|
|
6531
6543
|
resetZoom();
|
|
6532
6544
|
return;
|
|
6533
6545
|
}
|
|
6534
6546
|
magnifyBtn.value = !magnifyBtn.value;
|
|
6535
|
-
playerDom?.addEventListener("mousedown", mousedownFun
|
|
6536
|
-
|
|
6547
|
+
playerDom?.addEventListener("mousedown", mousedownFun, {
|
|
6548
|
+
capture: true
|
|
6549
|
+
});
|
|
6550
|
+
document?.addEventListener("mouseup", mouseupFun, {
|
|
6551
|
+
capture: true
|
|
6552
|
+
});
|
|
6537
6553
|
};
|
|
6538
6554
|
const fill = ref("fill");
|
|
6539
6555
|
watch(() => _prop.camera, val => {
|
|
6540
6556
|
if (val && Object.keys(val).length != 0) {
|
|
6557
|
+
if (magnifyBtn.value) {
|
|
6558
|
+
setZoom();
|
|
6559
|
+
}
|
|
6541
6560
|
camera.value = void 0;
|
|
6542
6561
|
getVideoParams(val);
|
|
6543
6562
|
getVideoDetail(val);
|
|
@@ -6612,7 +6631,8 @@ const VideoBoxV2 = defineComponent({
|
|
|
6612
6631
|
}, [createVNode("div", {
|
|
6613
6632
|
"class": "name-min"
|
|
6614
6633
|
}, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
|
|
6615
|
-
"class": "tool"
|
|
6634
|
+
"class": "tool",
|
|
6635
|
+
"onClick": () => {}
|
|
6616
6636
|
}, [_prop.btns.map(btn => {
|
|
6617
6637
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
6618
6638
|
switch (btn) {
|