inl-ui 0.1.37 → 0.1.39

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.
@@ -8772,14 +8772,6 @@ const VideoPlayerV2 = vue.defineComponent({
8772
8772
  }
8773
8773
  });
8774
8774
  };
8775
- const stopV = id => {
8776
- const videoElement = document.getElementById(id);
8777
- if (videoElement) {
8778
- videoElement.pause();
8779
- videoElement.removeAttribute("src");
8780
- videoElement.load();
8781
- }
8782
- };
8783
8775
  const releaseUrl = vue.ref("");
8784
8776
  const release = async () => {
8785
8777
  const res = await axios__default["default"].get(releaseUrl.value);
@@ -8829,7 +8821,6 @@ const VideoPlayerV2 = vue.defineComponent({
8829
8821
  };
8830
8822
  vue.watch([() => _prop.camera, () => _prop.cameraConfig], ([camera, cameraConfig]) => {
8831
8823
  stopPlay();
8832
- stopV(`videoPlayer_${uuid}`);
8833
8824
  getVideoDetail(camera);
8834
8825
  }, {
8835
8826
  immediate: true,
@@ -8837,27 +8828,27 @@ const VideoPlayerV2 = vue.defineComponent({
8837
8828
  });
8838
8829
  vue.onBeforeUnmount(() => {
8839
8830
  stopPlay();
8840
- const videoElement = document.getElementById(`videoPlayer_${uuid}`);
8841
- if (videoElement) {
8842
- videoElement.pause();
8843
- videoElement.src = null;
8844
- videoElement.srcObject = null;
8845
- videoElement.remove();
8846
- }
8847
8831
  });
8848
- return () => videoInfo2.value.brandTypeCode !== "MP4" ? vue.createVNode("video", {
8849
- "id": `videoPlayer_${uuid}`,
8850
- "class": `videoComponent ${_prop.fill}`,
8851
- "muted": true,
8852
- "autoplay": true
8853
- }, null) : vue.createVNode("video", {
8854
- "id": `videoPlayer_${uuid}`,
8855
- "class": "videoComponent fill",
8856
- "src": videoInfo2.value.mp4ResourcesPath,
8857
- "autoplay": true,
8858
- "loop": true,
8859
- "muted": true
8860
- }, null);
8832
+ const renderVideo = () => {
8833
+ if (videoInfo2.value.brandTypeCode === "MP4") {
8834
+ return vue.createVNode("video", {
8835
+ "id": `mp4Player_${uuid}`,
8836
+ "class": "videoComponent fill",
8837
+ "src": videoInfo2.value.mp4ResourcesPath,
8838
+ "autoplay": true,
8839
+ "loop": true,
8840
+ "muted": true
8841
+ }, null);
8842
+ } else {
8843
+ return vue.createVNode("video", {
8844
+ "id": `videoPlayer_${uuid}`,
8845
+ "class": `videoComponent ${_prop.fill}`,
8846
+ "muted": true,
8847
+ "autoplay": true
8848
+ }, null);
8849
+ }
8850
+ };
8851
+ return () => vue.createVNode(vue.Fragment, null, [renderVideo()]);
8861
8852
  }
8862
8853
  });
8863
8854
  var videoPlayerV2 = installComponent(VideoPlayerV2, "video-player-v2");
@@ -9162,7 +9153,7 @@ const props$6 = {
9162
9153
  // },
9163
9154
  btns: {
9164
9155
  type: Array,
9165
- default: ["fill", "look", "stream", "direction", "fullScreen", "close"]
9156
+ default: ["fill", "look", "stream", "magnify", "direction", "fullScreen", "close"]
9166
9157
  },
9167
9158
  alarm: {
9168
9159
  default: false,
@@ -9185,6 +9176,7 @@ const VideoBoxV2 = vue.defineComponent({
9185
9176
  const streamHistory = vue.ref("");
9186
9177
  const streams = vue.ref([]);
9187
9178
  const showInfo = vue.ref(true);
9179
+ const magnifyBtn = vue.ref(false);
9188
9180
  const videoBtns = [[{
9189
9181
  text: "lup",
9190
9182
  signal: 25
@@ -9211,7 +9203,7 @@ const VideoBoxV2 = vue.defineComponent({
9211
9203
  signal: 28
9212
9204
  }]];
9213
9205
  const infos = vue.ref([]);
9214
- const uuid = UUID();
9206
+ const uuid = vue.ref(UUID());
9215
9207
  vue.onMounted(() => {
9216
9208
  showInfo.value = _prop.showInfo;
9217
9209
  });
@@ -9288,14 +9280,83 @@ const VideoBoxV2 = vue.defineComponent({
9288
9280
  }
9289
9281
  });
9290
9282
  camera.value = res.data.data;
9291
- streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
9283
+ streams.value = JSON.parse(camera.value?.brandTypePo?.streamTypeDict || "[]");
9292
9284
  };
9293
9285
  let timeout;
9294
9286
  vue.ref(true);
9295
9287
  vue.onBeforeUnmount(() => {});
9288
+ const resetZoom = () => {
9289
+ const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
9290
+ chooseFieldDom?.remove();
9291
+ const dom = document.getElementById("videoPlayer_" + uuid.value);
9292
+ dom.style.left = "0px";
9293
+ dom.style.top = "0px";
9294
+ dom.style.width = "100%";
9295
+ dom.style.height = "100%";
9296
+ };
9297
+ let boxDom;
9298
+ let playerDom;
9299
+ let newDiv;
9300
+ let begin = {
9301
+ left: 0,
9302
+ top: 0
9303
+ };
9304
+ let mousedownEvent;
9305
+ const mousemoveFun = mousemoveEvent => {
9306
+ newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
9307
+ newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
9308
+ newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
9309
+ newDiv.style.top = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) + begin.top + "px";
9310
+ };
9311
+ const mousedownFun = e => {
9312
+ mousedownEvent = e;
9313
+ begin.left = Number(playerDom.style.left.split("px")[0]);
9314
+ begin.top = Number(playerDom.style.top.split("px")[0]);
9315
+ newDiv = document.createElement("div");
9316
+ newDiv.id = "tempDiv";
9317
+ newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
9318
+ newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
9319
+ boxDom.appendChild(newDiv);
9320
+ playerDom?.addEventListener("mousemove", mousemoveFun);
9321
+ };
9322
+ const mouseupFun = mouseupEvent => {
9323
+ playerDom?.removeEventListener("mousemove", mousemoveFun);
9324
+ newDiv.remove();
9325
+ const scaleX = Math.abs(mouseupEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
9326
+ const scaleY = Math.abs(mouseupEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
9327
+ const playerLeft = Math.min(mousedownEvent.offsetX, mouseupEvent.offsetX) * -1 / scaleX;
9328
+ const playerTop = Math.min(mousedownEvent.offsetY, mouseupEvent.offsetY) * -1 / scaleY;
9329
+ const playerWidth = playerDom.offsetWidth / scaleX;
9330
+ const playerHeight = playerDom.offsetHeight / scaleY;
9331
+ playerDom.style.left = playerLeft + "px";
9332
+ playerDom.style.top = playerTop + "px";
9333
+ playerDom.style.width = playerWidth + "px";
9334
+ playerDom.style.height = playerHeight + "px";
9335
+ const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
9336
+ chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
9337
+ chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
9338
+ const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
9339
+ chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
9340
+ chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
9341
+ };
9342
+ const setZoom = async () => {
9343
+ boxDom = document.getElementById("videoBox_" + uuid.value);
9344
+ playerDom = document.getElementById("videoPlayer_" + uuid.value);
9345
+ if (magnifyBtn.value) {
9346
+ magnifyBtn.value = !magnifyBtn.value;
9347
+ playerDom?.removeEventListener("mousedown", mousedownFun);
9348
+ playerDom?.removeEventListener("mouseup", mouseupFun);
9349
+ resetZoom();
9350
+ return;
9351
+ }
9352
+ magnifyBtn.value = !magnifyBtn.value;
9353
+ playerDom?.addEventListener("mousedown", mousedownFun);
9354
+ playerDom?.addEventListener("mouseup", mouseupFun);
9355
+ };
9296
9356
  const fill = vue.ref("fill");
9297
9357
  vue.watch(() => _prop.camera, val => {
9298
9358
  if (val && Object.keys(val).length != 0) {
9359
+ camera.value = void 0;
9299
9360
  getVideoParams(val);
9300
9361
  getVideoDetail(val);
9301
9362
  const fillVal = localStorage.getItem(val);
@@ -9313,27 +9374,44 @@ const VideoBoxV2 = vue.defineComponent({
9313
9374
  token: sessionStorage.getItem("token") || ""
9314
9375
  },
9315
9376
  params: {
9316
- uuid: camera.value.uuid,
9377
+ uuid: camera.value?.uuid,
9317
9378
  chosenStreamType: code
9318
9379
  }
9319
9380
  });
9320
9381
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
9321
9382
  };
9322
9383
  return () => vue.createVNode("div", {
9323
- "id": "videoBox_" + uuid,
9384
+ "id": "videoBox_" + uuid.value,
9324
9385
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
9386
+ }, [camera.value ? vue.createVNode(VideoPlayerV2, {
9387
+ "ref": player,
9388
+ "domId": uuid.value,
9389
+ "camera": camera.value,
9390
+ "cameraConfig": cameraConfig.value,
9391
+ "fill": fill.value,
9392
+ "onChangeStream": () => {
9393
+ cameraConfig.value = {
9394
+ streamType: streamHistory.value || camera.value?.streamType
9395
+ };
9396
+ }
9397
+ }, null) : "", magnifyBtn.value ? vue.createVNode("div", {
9398
+ "class": "thumbnail",
9399
+ "id": "thumbnail_" + uuid.value
9325
9400
  }, [vue.createVNode(VideoPlayerV2, {
9326
9401
  "ref": player,
9327
- "domId": uuid,
9402
+ "domId": UUID(),
9328
9403
  "camera": camera.value,
9329
9404
  "cameraConfig": cameraConfig.value,
9330
9405
  "fill": fill.value,
9331
9406
  "onChangeStream": () => {
9332
9407
  cameraConfig.value = {
9333
- streamType: streamHistory.value || camera.value.streamType
9408
+ streamType: streamHistory.value || camera.value?.streamType
9334
9409
  };
9335
9410
  }
9336
- }, null), showInfo.value ? vue.createVNode("div", {
9411
+ }, null), vue.createVNode("div", {
9412
+ "class": "chooseField",
9413
+ "id": "chooseField_" + uuid.value
9414
+ }, null)]) : "", showInfo.value ? vue.createVNode("div", {
9337
9415
  "class": "selectFields"
9338
9416
  }, [[0, 1, 2, 3, 4, 5].map(index => {
9339
9417
  let info = {};
@@ -9354,7 +9432,7 @@ const VideoBoxV2 = vue.defineComponent({
9354
9432
  }, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
9355
9433
  "class": "tool"
9356
9434
  }, [_prop.btns.map(btn => {
9357
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9435
+ if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9358
9436
  switch (btn) {
9359
9437
  case "fill":
9360
9438
  return vue.createVNode("img", {
@@ -9362,10 +9440,10 @@ const VideoBoxV2 = vue.defineComponent({
9362
9440
  "onClick": e => {
9363
9441
  if (fill.value === "fill") {
9364
9442
  fill.value = "contain";
9365
- localStorage.setItem(camera.value.uuid, fill.value);
9443
+ localStorage.setItem(camera.value?.uuid, fill.value);
9366
9444
  } else {
9367
9445
  fill.value = "fill";
9368
- localStorage.setItem(camera.value.uuid, fill.value);
9446
+ localStorage.setItem(camera.value?.uuid, fill.value);
9369
9447
  }
9370
9448
  },
9371
9449
  "src": "/micro-assets/inl/video/controls/fill.svg"
@@ -9395,6 +9473,14 @@ const VideoBoxV2 = vue.defineComponent({
9395
9473
  "src": "/micro-assets/inl/video/stream.png"
9396
9474
  }, null)]
9397
9475
  });
9476
+ case "magnify":
9477
+ return vue.createVNode("img", {
9478
+ "title": "\u653E\u5927",
9479
+ "onClick": e => {
9480
+ setZoom();
9481
+ },
9482
+ "src": "/micro-assets/inl/video/controls/magnify.svg"
9483
+ }, null);
9398
9484
  case "direction":
9399
9485
  return vue.createVNode(vue.resolveComponent("a-popover"), {
9400
9486
  "title": "\u63A7\u5236\u5668",
@@ -9503,13 +9589,13 @@ const PollingPlay = vue.defineComponent({
9503
9589
  fullScreen: false,
9504
9590
  name: ""
9505
9591
  });
9506
- const setCurrentVideos = team => {
9592
+ const setCurrentVideos = async team => {
9507
9593
  data.name = team.pollingGroupName;
9508
9594
  data.showType = `type${team.amount}`;
9509
- data.pointList.length = 0;
9595
+ data.pointList = [];
9510
9596
  for (let i = 0; i < parseInt(team.amount, 10); i++) {
9511
9597
  const video = team.monitorPointPoList[i];
9512
- data.pointList.push(video?.cameraUuid || {});
9598
+ data.pointList.push(video?.cameraUuid || "");
9513
9599
  }
9514
9600
  };
9515
9601
  const findShouldPlay = () => {
@@ -9595,16 +9681,18 @@ const PollingPlay = vue.defineComponent({
9595
9681
  }, null), "\u5168\u5C4F\u663E\u793A"])]) : "", vue.createVNode("div", {
9596
9682
  "id": "grid",
9597
9683
  "class": ["grid", data.showType, data.fullScreen ? "full" : ""]
9598
- }, [data.pointList.map((item, index) => vue.createVNode("div", {
9599
- "class": "video"
9600
- }, [_props.version === "V2" ? vue.createVNode(VideoBoxV2, {
9601
- "camera": item,
9602
- "btns": _props.btns,
9603
- "alarm": alarmList.value[index]
9604
- }, null) : vue.createVNode(VideoBox, {
9605
- "camera": item,
9606
- "btns": _props.btns
9607
- }, null)]))])]);
9684
+ }, [data.pointList.map((item, index) => {
9685
+ return vue.createVNode("div", {
9686
+ "class": "video"
9687
+ }, [_props.version === "V2" ? vue.createVNode(VideoBoxV2, {
9688
+ "camera": item,
9689
+ "btns": _props.btns,
9690
+ "alarm": alarmList.value[index]
9691
+ }, null) : vue.createVNode(VideoBox, {
9692
+ "camera": item,
9693
+ "btns": _props.btns
9694
+ }, null)]);
9695
+ })])]);
9608
9696
  }
9609
9697
  });
9610
9698
  var pollingPlay = installComponent(PollingPlay, "polling-play");
@@ -8761,14 +8761,6 @@ const VideoPlayerV2 = defineComponent({
8761
8761
  }
8762
8762
  });
8763
8763
  };
8764
- const stopV = id => {
8765
- const videoElement = document.getElementById(id);
8766
- if (videoElement) {
8767
- videoElement.pause();
8768
- videoElement.removeAttribute("src");
8769
- videoElement.load();
8770
- }
8771
- };
8772
8764
  const releaseUrl = ref("");
8773
8765
  const release = async () => {
8774
8766
  const res = await axios$2.get(releaseUrl.value);
@@ -8818,7 +8810,6 @@ const VideoPlayerV2 = defineComponent({
8818
8810
  };
8819
8811
  watch([() => _prop.camera, () => _prop.cameraConfig], ([camera, cameraConfig]) => {
8820
8812
  stopPlay();
8821
- stopV(`videoPlayer_${uuid}`);
8822
8813
  getVideoDetail(camera);
8823
8814
  }, {
8824
8815
  immediate: true,
@@ -8826,27 +8817,27 @@ const VideoPlayerV2 = defineComponent({
8826
8817
  });
8827
8818
  onBeforeUnmount(() => {
8828
8819
  stopPlay();
8829
- const videoElement = document.getElementById(`videoPlayer_${uuid}`);
8830
- if (videoElement) {
8831
- videoElement.pause();
8832
- videoElement.src = null;
8833
- videoElement.srcObject = null;
8834
- videoElement.remove();
8835
- }
8836
8820
  });
8837
- return () => videoInfo2.value.brandTypeCode !== "MP4" ? createVNode("video", {
8838
- "id": `videoPlayer_${uuid}`,
8839
- "class": `videoComponent ${_prop.fill}`,
8840
- "muted": true,
8841
- "autoplay": true
8842
- }, null) : createVNode("video", {
8843
- "id": `videoPlayer_${uuid}`,
8844
- "class": "videoComponent fill",
8845
- "src": videoInfo2.value.mp4ResourcesPath,
8846
- "autoplay": true,
8847
- "loop": true,
8848
- "muted": true
8849
- }, null);
8821
+ const renderVideo = () => {
8822
+ if (videoInfo2.value.brandTypeCode === "MP4") {
8823
+ return createVNode("video", {
8824
+ "id": `mp4Player_${uuid}`,
8825
+ "class": "videoComponent fill",
8826
+ "src": videoInfo2.value.mp4ResourcesPath,
8827
+ "autoplay": true,
8828
+ "loop": true,
8829
+ "muted": true
8830
+ }, null);
8831
+ } else {
8832
+ return createVNode("video", {
8833
+ "id": `videoPlayer_${uuid}`,
8834
+ "class": `videoComponent ${_prop.fill}`,
8835
+ "muted": true,
8836
+ "autoplay": true
8837
+ }, null);
8838
+ }
8839
+ };
8840
+ return () => createVNode(Fragment, null, [renderVideo()]);
8850
8841
  }
8851
8842
  });
8852
8843
  var videoPlayerV2 = installComponent(VideoPlayerV2, "video-player-v2");
@@ -9151,7 +9142,7 @@ const props$6 = {
9151
9142
  // },
9152
9143
  btns: {
9153
9144
  type: Array,
9154
- default: ["fill", "look", "stream", "direction", "fullScreen", "close"]
9145
+ default: ["fill", "look", "stream", "magnify", "direction", "fullScreen", "close"]
9155
9146
  },
9156
9147
  alarm: {
9157
9148
  default: false,
@@ -9174,6 +9165,7 @@ const VideoBoxV2 = defineComponent({
9174
9165
  const streamHistory = ref("");
9175
9166
  const streams = ref([]);
9176
9167
  const showInfo = ref(true);
9168
+ const magnifyBtn = ref(false);
9177
9169
  const videoBtns = [[{
9178
9170
  text: "lup",
9179
9171
  signal: 25
@@ -9200,7 +9192,7 @@ const VideoBoxV2 = defineComponent({
9200
9192
  signal: 28
9201
9193
  }]];
9202
9194
  const infos = ref([]);
9203
- const uuid = UUID();
9195
+ const uuid = ref(UUID());
9204
9196
  onMounted(() => {
9205
9197
  showInfo.value = _prop.showInfo;
9206
9198
  });
@@ -9277,14 +9269,83 @@ const VideoBoxV2 = defineComponent({
9277
9269
  }
9278
9270
  });
9279
9271
  camera.value = res.data.data;
9280
- streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
9272
+ streams.value = JSON.parse(camera.value?.brandTypePo?.streamTypeDict || "[]");
9281
9273
  };
9282
9274
  let timeout;
9283
9275
  ref(true);
9284
9276
  onBeforeUnmount(() => {});
9277
+ const resetZoom = () => {
9278
+ const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
9279
+ chooseFieldDom?.remove();
9280
+ const dom = document.getElementById("videoPlayer_" + uuid.value);
9281
+ dom.style.left = "0px";
9282
+ dom.style.top = "0px";
9283
+ dom.style.width = "100%";
9284
+ dom.style.height = "100%";
9285
+ };
9286
+ let boxDom;
9287
+ let playerDom;
9288
+ let newDiv;
9289
+ let begin = {
9290
+ left: 0,
9291
+ top: 0
9292
+ };
9293
+ let mousedownEvent;
9294
+ const mousemoveFun = mousemoveEvent => {
9295
+ newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) - 3 + "px";
9296
+ newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) - 3 + "px";
9297
+ newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
9298
+ newDiv.style.top = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) + begin.top + "px";
9299
+ };
9300
+ const mousedownFun = e => {
9301
+ mousedownEvent = e;
9302
+ begin.left = Number(playerDom.style.left.split("px")[0]);
9303
+ begin.top = Number(playerDom.style.top.split("px")[0]);
9304
+ newDiv = document.createElement("div");
9305
+ newDiv.id = "tempDiv";
9306
+ newDiv.style.left = mousedownEvent.offsetX + begin.left + "px";
9307
+ newDiv.style.top = mousedownEvent.offsetY + begin.top + "px";
9308
+ boxDom.appendChild(newDiv);
9309
+ playerDom?.addEventListener("mousemove", mousemoveFun);
9310
+ };
9311
+ const mouseupFun = mouseupEvent => {
9312
+ playerDom?.removeEventListener("mousemove", mousemoveFun);
9313
+ newDiv.remove();
9314
+ const scaleX = Math.abs(mouseupEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
9315
+ const scaleY = Math.abs(mouseupEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
9316
+ const playerLeft = Math.min(mousedownEvent.offsetX, mouseupEvent.offsetX) * -1 / scaleX;
9317
+ const playerTop = Math.min(mousedownEvent.offsetY, mouseupEvent.offsetY) * -1 / scaleY;
9318
+ const playerWidth = playerDom.offsetWidth / scaleX;
9319
+ const playerHeight = playerDom.offsetHeight / scaleY;
9320
+ playerDom.style.left = playerLeft + "px";
9321
+ playerDom.style.top = playerTop + "px";
9322
+ playerDom.style.width = playerWidth + "px";
9323
+ playerDom.style.height = playerHeight + "px";
9324
+ const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
9325
+ chooseFieldDom.style.width = chooseFieldDom.offsetWidth * scaleX + "px";
9326
+ chooseFieldDom.style.height = chooseFieldDom.offsetHeight * scaleY + "px";
9327
+ const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
9328
+ chooseFieldDom.style.left = thumbnailDom.offsetWidth * -1 * playerLeft / playerWidth + "px";
9329
+ chooseFieldDom.style.top = thumbnailDom.offsetHeight * -1 * playerTop / playerHeight + "px";
9330
+ };
9331
+ const setZoom = async () => {
9332
+ boxDom = document.getElementById("videoBox_" + uuid.value);
9333
+ playerDom = document.getElementById("videoPlayer_" + uuid.value);
9334
+ if (magnifyBtn.value) {
9335
+ magnifyBtn.value = !magnifyBtn.value;
9336
+ playerDom?.removeEventListener("mousedown", mousedownFun);
9337
+ playerDom?.removeEventListener("mouseup", mouseupFun);
9338
+ resetZoom();
9339
+ return;
9340
+ }
9341
+ magnifyBtn.value = !magnifyBtn.value;
9342
+ playerDom?.addEventListener("mousedown", mousedownFun);
9343
+ playerDom?.addEventListener("mouseup", mouseupFun);
9344
+ };
9285
9345
  const fill = ref("fill");
9286
9346
  watch(() => _prop.camera, val => {
9287
9347
  if (val && Object.keys(val).length != 0) {
9348
+ camera.value = void 0;
9288
9349
  getVideoParams(val);
9289
9350
  getVideoDetail(val);
9290
9351
  const fillVal = localStorage.getItem(val);
@@ -9302,27 +9363,44 @@ const VideoBoxV2 = defineComponent({
9302
9363
  token: sessionStorage.getItem("token") || ""
9303
9364
  },
9304
9365
  params: {
9305
- uuid: camera.value.uuid,
9366
+ uuid: camera.value?.uuid,
9306
9367
  chosenStreamType: code
9307
9368
  }
9308
9369
  });
9309
9370
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
9310
9371
  };
9311
9372
  return () => createVNode("div", {
9312
- "id": "videoBox_" + uuid,
9373
+ "id": "videoBox_" + uuid.value,
9313
9374
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
9375
+ }, [camera.value ? createVNode(VideoPlayerV2, {
9376
+ "ref": player,
9377
+ "domId": uuid.value,
9378
+ "camera": camera.value,
9379
+ "cameraConfig": cameraConfig.value,
9380
+ "fill": fill.value,
9381
+ "onChangeStream": () => {
9382
+ cameraConfig.value = {
9383
+ streamType: streamHistory.value || camera.value?.streamType
9384
+ };
9385
+ }
9386
+ }, null) : "", magnifyBtn.value ? createVNode("div", {
9387
+ "class": "thumbnail",
9388
+ "id": "thumbnail_" + uuid.value
9314
9389
  }, [createVNode(VideoPlayerV2, {
9315
9390
  "ref": player,
9316
- "domId": uuid,
9391
+ "domId": UUID(),
9317
9392
  "camera": camera.value,
9318
9393
  "cameraConfig": cameraConfig.value,
9319
9394
  "fill": fill.value,
9320
9395
  "onChangeStream": () => {
9321
9396
  cameraConfig.value = {
9322
- streamType: streamHistory.value || camera.value.streamType
9397
+ streamType: streamHistory.value || camera.value?.streamType
9323
9398
  };
9324
9399
  }
9325
- }, null), showInfo.value ? createVNode("div", {
9400
+ }, null), createVNode("div", {
9401
+ "class": "chooseField",
9402
+ "id": "chooseField_" + uuid.value
9403
+ }, null)]) : "", showInfo.value ? createVNode("div", {
9326
9404
  "class": "selectFields"
9327
9405
  }, [[0, 1, 2, 3, 4, 5].map(index => {
9328
9406
  let info = {};
@@ -9343,7 +9421,7 @@ const VideoBoxV2 = defineComponent({
9343
9421
  }, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
9344
9422
  "class": "tool"
9345
9423
  }, [_prop.btns.map(btn => {
9346
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9424
+ if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9347
9425
  switch (btn) {
9348
9426
  case "fill":
9349
9427
  return createVNode("img", {
@@ -9351,10 +9429,10 @@ const VideoBoxV2 = defineComponent({
9351
9429
  "onClick": e => {
9352
9430
  if (fill.value === "fill") {
9353
9431
  fill.value = "contain";
9354
- localStorage.setItem(camera.value.uuid, fill.value);
9432
+ localStorage.setItem(camera.value?.uuid, fill.value);
9355
9433
  } else {
9356
9434
  fill.value = "fill";
9357
- localStorage.setItem(camera.value.uuid, fill.value);
9435
+ localStorage.setItem(camera.value?.uuid, fill.value);
9358
9436
  }
9359
9437
  },
9360
9438
  "src": "/micro-assets/inl/video/controls/fill.svg"
@@ -9384,6 +9462,14 @@ const VideoBoxV2 = defineComponent({
9384
9462
  "src": "/micro-assets/inl/video/stream.png"
9385
9463
  }, null)]
9386
9464
  });
9465
+ case "magnify":
9466
+ return createVNode("img", {
9467
+ "title": "\u653E\u5927",
9468
+ "onClick": e => {
9469
+ setZoom();
9470
+ },
9471
+ "src": "/micro-assets/inl/video/controls/magnify.svg"
9472
+ }, null);
9387
9473
  case "direction":
9388
9474
  return createVNode(resolveComponent("a-popover"), {
9389
9475
  "title": "\u63A7\u5236\u5668",
@@ -9492,13 +9578,13 @@ const PollingPlay = defineComponent({
9492
9578
  fullScreen: false,
9493
9579
  name: ""
9494
9580
  });
9495
- const setCurrentVideos = team => {
9581
+ const setCurrentVideos = async team => {
9496
9582
  data.name = team.pollingGroupName;
9497
9583
  data.showType = `type${team.amount}`;
9498
- data.pointList.length = 0;
9584
+ data.pointList = [];
9499
9585
  for (let i = 0; i < parseInt(team.amount, 10); i++) {
9500
9586
  const video = team.monitorPointPoList[i];
9501
- data.pointList.push(video?.cameraUuid || {});
9587
+ data.pointList.push(video?.cameraUuid || "");
9502
9588
  }
9503
9589
  };
9504
9590
  const findShouldPlay = () => {
@@ -9584,16 +9670,18 @@ const PollingPlay = defineComponent({
9584
9670
  }, null), "\u5168\u5C4F\u663E\u793A"])]) : "", createVNode("div", {
9585
9671
  "id": "grid",
9586
9672
  "class": ["grid", data.showType, data.fullScreen ? "full" : ""]
9587
- }, [data.pointList.map((item, index) => createVNode("div", {
9588
- "class": "video"
9589
- }, [_props.version === "V2" ? createVNode(VideoBoxV2, {
9590
- "camera": item,
9591
- "btns": _props.btns,
9592
- "alarm": alarmList.value[index]
9593
- }, null) : createVNode(VideoBox, {
9594
- "camera": item,
9595
- "btns": _props.btns
9596
- }, null)]))])]);
9673
+ }, [data.pointList.map((item, index) => {
9674
+ return createVNode("div", {
9675
+ "class": "video"
9676
+ }, [_props.version === "V2" ? createVNode(VideoBoxV2, {
9677
+ "camera": item,
9678
+ "btns": _props.btns,
9679
+ "alarm": alarmList.value[index]
9680
+ }, null) : createVNode(VideoBox, {
9681
+ "camera": item,
9682
+ "btns": _props.btns
9683
+ }, null)]);
9684
+ })])]);
9597
9685
  }
9598
9686
  });
9599
9687
  var pollingPlay = installComponent(PollingPlay, "polling-play");
@@ -1,3 +1,3 @@
1
- .playVideos{display:flex;flex-direction:column;height:100%;padding-left:20px}.playVideos .operate{display:flex;justify-content:space-between;margin:5px 0}.playVideos .operate .button{cursor:pointer}.playVideos .grid{display:grid;flex:1;overflow:hidden}.playVideos .grid .video{background:#000;border:1px solid hsla(216,7%,59%,.3);height:100%;object-fit:fill;overflow:hidden;width:100%}.playVideos .grid.full{height:100%;left:0;position:fixed;top:0;width:100%;z-index:10}.playVideos .type1{grid-template-columns:1fr;grid-template-rows:1fr}.playVideos .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.playVideos .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type8 .video:first-child{grid-column:1/4;grid-row:1/4}.playVideos .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.playVideos .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type13 .video:first-child{grid-column:1/3;grid-row:1/3}.playVideos .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}@keyframes moveBottom{0%{bottom:0}to{bottom:-66px}}.videoComponent{background:#000;height:100%;position:relative;width:100%}.videoComponent.fill{object-fit:fill}.videoComponent.contain{object-fit:contain}.videoBox{height:100%;overflow:hidden;position:relative}.videoBox .videoStatic{height:100%;object-fit:fill;width:100%}.videoBox.alarm:before{border:2px solid #ea5858;box-shadow:inset 0 0 10px 8px rgba(234,88,88,.5);content:"";height:100%;pointer-events:none;position:absolute;top:0;width:100%;z-index:7}.videoBox:hover .selectFields{animation-duration:1s;animation-fill-mode:both;animation-name:moveBottom}.videoBox:hover .footer-min{display:flex}.videoBox:hover .footer-min .name-min span,.videoBox:hover .footer-min .tool{display:block}.videoBox .selectFields{background:rgba(0,0,0,.3);bottom:0;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;height:66px;position:absolute;width:100%}.videoBox .selectFields .info{border:0;color:#fff;line-height:33px;overflow:hidden;padding:0 5px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.videoBox .selectFields .info .value{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.videoBox .footer-min{align-items:center;backdrop-filter:blur(10px);background:hsla(0,0%,100%,.04);border-radius:4px 4px 0 0;bottom:0;display:none;height:44px;justify-content:space-between;position:absolute;width:100%}.videoBox .footer-min .name-min{align-items:center;display:flex;padding-left:15px}.videoBox .footer-min .name-min span{color:#fff;display:none;font-size:16px;font-weight:600}.videoBox .footer-min .tool{display:none}.videoBox .footer-min .tool img{cursor:pointer;height:20px;margin-right:15px;width:20px}.videoControls{align-items:center;display:flex;flex-direction:column;width:100%}.videoControls .videoControl{height:126px;position:relative;width:126px}.videoControls .videoControl .bg{height:100%;position:relative;width:100%}.videoControls .videoControl img{cursor:pointer;position:absolute}.videoControls .videoControl .up{left:52px;top:14px}.videoControls .videoControl .lup{left:26px;top:26px;transform:rotate(-45deg)}.videoControls .videoControl .rup{left:78px;top:27px;transform:rotate(45deg)}.videoControls .videoControl .left{left:14px;top:52px;transform:rotate(-90deg)}.videoControls .videoControl .right{left:90px;top:52px;transform:rotate(90deg)}.videoControls .videoControl .ldown{left:26px;top:78px;transform:rotate(215deg)}.videoControls .videoControl .down{left:52px;top:90px;transform:rotate(180deg)}.videoControls .videoControl .rdown{left:78px;top:78px;transform:rotate(135deg)}.videoControls .btns{background:#e0e7f2;border-radius:19px;height:28px;margin:8px 8px 0;padding:3px;width:56px}.videoControls .btns img{cursor:pointer;margin-right:1px}
1
+ .playVideos{display:flex;flex-direction:column;height:100%;padding-left:20px}.playVideos .operate{display:flex;justify-content:space-between;margin:5px 0}.playVideos .operate .button{cursor:pointer}.playVideos .grid{display:grid;flex:1;overflow:hidden}.playVideos .grid .video{background:#000;border:1px solid hsla(216,7%,59%,.3);height:100%;object-fit:fill;overflow:hidden;width:100%}.playVideos .grid.full{height:100%;left:0;position:fixed;top:0;width:100%;z-index:10}.playVideos .type1{grid-template-columns:1fr;grid-template-rows:1fr}.playVideos .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.playVideos .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type8 .video:first-child{grid-column:1/4;grid-row:1/4}.playVideos .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.playVideos .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type13 .video:first-child{grid-column:1/3;grid-row:1/3}.playVideos .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}@keyframes moveBottom{0%{bottom:0}to{bottom:-66px}}.videoComponent{background:#000;height:100%;left:0;position:relative;top:0;width:100%}.videoComponent.fill{object-fit:fill}.videoComponent.contain{object-fit:contain}.videoBox{height:100%;overflow:hidden;position:relative}.videoBox .videoStatic{height:100%;object-fit:fill;width:100%}.videoBox .thumbnail{background:#000;height:30%;left:70%;position:absolute;top:70%;width:30%}.videoBox .thumbnail .chooseField{border:1px solid red;height:100%;left:100%;position:absolute;top:100%;width:100%}.videoBox #tempDiv{border:2px solid red;position:absolute}.videoBox.alarm:before{border:2px solid #ea5858;box-shadow:inset 0 0 10px 8px rgba(234,88,88,.5);content:"";height:100%;pointer-events:none;position:absolute;top:0;width:100%;z-index:7}.videoBox:hover .selectFields{animation-duration:1s;animation-fill-mode:both;animation-name:moveBottom}.videoBox:hover .footer-min{display:flex}.videoBox:hover .footer-min .name-min span,.videoBox:hover .footer-min .tool{display:block}.videoBox .selectFields{background:rgba(0,0,0,.3);bottom:0;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;height:66px;position:absolute;width:100%}.videoBox .selectFields .info{border:0;color:#fff;line-height:33px;overflow:hidden;padding:0 5px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.videoBox .selectFields .info .value{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.videoBox .footer-min{align-items:center;backdrop-filter:blur(10px);background:hsla(0,0%,100%,.04);border-radius:4px 4px 0 0;bottom:0;display:none;height:44px;justify-content:space-between;position:absolute;width:100%}.videoBox .footer-min .name-min{align-items:center;display:flex;padding-left:15px}.videoBox .footer-min .name-min span{color:#fff;display:none;font-size:16px;font-weight:600}.videoBox .footer-min .tool{display:none}.videoBox .footer-min .tool img{cursor:pointer;height:20px;margin-right:15px;width:20px}.videoControls{align-items:center;display:flex;flex-direction:column;width:100%}.videoControls .videoControl{height:126px;position:relative;width:126px}.videoControls .videoControl .bg{height:100%;position:relative;width:100%}.videoControls .videoControl img{cursor:pointer;position:absolute}.videoControls .videoControl .up{left:52px;top:14px}.videoControls .videoControl .lup{left:26px;top:26px;transform:rotate(-45deg)}.videoControls .videoControl .rup{left:78px;top:27px;transform:rotate(45deg)}.videoControls .videoControl .left{left:14px;top:52px;transform:rotate(-90deg)}.videoControls .videoControl .right{left:90px;top:52px;transform:rotate(90deg)}.videoControls .videoControl .ldown{left:26px;top:78px;transform:rotate(215deg)}.videoControls .videoControl .down{left:52px;top:90px;transform:rotate(180deg)}.videoControls .videoControl .rdown{left:78px;top:78px;transform:rotate(135deg)}.videoControls .btns{background:#e0e7f2;border-radius:19px;height:28px;margin:8px 8px 0;padding:3px;width:56px}.videoControls .btns img{cursor:pointer;margin-right:1px}
2
2
  .videoAlarmDia.dark{background:linear-gradient(90deg,#3e7eff,#1e4e75 30%,#1e4e75 70%,#3e7eff);padding:1px}.videoAlarmDia.dark .ant-modal-close{color:#fff}.videoAlarmDia.dark .ant-modal-header{background-color:#22396f;border-bottom-color:transparent;padding-left:20px}.videoAlarmDia.dark .ant-modal-header .ant-modal-title{align-items:center;background-image:linear-gradient(90deg,#2852a8 0,rgba(40,82,168,0) 50%);color:#fff;display:flex;height:42px;padding-left:10px}.videoAlarmDia.dark .ant-modal-content{background-color:#22396f}.videoAlarmDia.dark .ant-modal-content .body,.videoAlarmDia.dark .ant-modal-content .body .alarmList .alarm .name,.videoAlarmDia.dark .ant-modal-content .body .alarmList .title,.videoAlarmDia.dark .ant-modal-content .body .themeImg{color:#fff}.videoAlarmDia.dark .ant-modal-content .body .tabs .tabContainer .allTab .tab{background:#ffffff1a;color:#fff}.videoAlarmDia.dark .ant-modal-content .body .tabs .tabContainer .allTab .tab.active{background:#3e7eff;color:#fff}.videoAlarmDia .ant-modal-body{padding-top:18px}.videoAlarmDia .body{display:flex;flex-direction:column;height:660px}.videoAlarmDia .body .title{color:#000;font-size:18px}.videoAlarmDia .body .themeImg{height:18px;margin-right:5px;width:18px}.videoAlarmDia .body .current{align-self:center;display:flex;height:400px;justify-content:center;margin:10px 0 25px;width:750px}.videoAlarmDia .body .current .grid{grid-gap:3px;background-color:transparent;display:grid;height:100%;overflow:hidden;width:100%}.videoAlarmDia .body .current .grid .videoBox{background-color:#000}.videoAlarmDia .body .alarmList{display:flex;flex-wrap:wrap;justify-content:flex-start;max-height:80px;overflow:auto}.videoAlarmDia .body .alarmList .title{font-size:14px;font-weight:600;margin-bottom:10px}.videoAlarmDia .body .alarmList .alarm{align-items:center;border-radius:5px;color:#000;cursor:pointer;height:24px;margin-bottom:10px;margin-right:10px;padding:5px}.videoAlarmDia .body .alarmList .alarm img{height:16px;margin-right:5px;width:16px}.videoAlarmDia .body .alarmList .alarm .name{font-size:14px;white-space:nowrap}.videoAlarmDia .body .alarmList .alarm1{background:rgba(234,88,88,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm2{background:rgba(255,146,20,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm3{background:rgba(255,196,20,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm4{background:rgba(62,126,255,.1);color:#354052}.videoAlarmDia .body .tip{align-items:center;display:flex;margin:0}.videoAlarmDia .body .tip .sumNum{margin-right:16px}.videoAlarmDia .body .tip .timeNum{color:#3e7eff;font-weight:600;margin-right:5px}.videoAlarmDia .body .tabs{align-items:center;display:flex;margin:10px 0 5px}.videoAlarmDia .body .tabs .themeImg{cursor:pointer;overflow:visible}.videoAlarmDia .body .tabs .endIcon{margin-left:10px}.videoAlarmDia .body .tabs .tabContainer{display:flex;overflow:hidden}.videoAlarmDia .body .tabs .tabContainer .allTab{display:flex;height:40px;left:0;position:relative}.videoAlarmDia .body .tabs .tabContainer .allTab .tab{background:#f2f3f8;border-radius:4px;cursor:pointer;font-size:14px;height:32px;line-height:32px;margin-right:10px;padding:0 10px;position:relative;text-align:center;white-space:nowrap}.videoAlarmDia .body .tabs .tabContainer .allTab .tab.active{background:#1d33a2;color:#fff}.videoAlarmDia .body .tabs .tabContainer .allTab .tab.active:after{border:10px solid transparent;border-top-color:#1d33a2;content:"";height:0;left:50%;position:absolute;top:30px;width:0}.videoAlarmDia .body .numLine{align-items:center;display:flex}.videoAlarmDia .body .numLine .cameraNum{color:#3e7eff;font-weight:600}.videoAlarmDia .body .numLine .tipImg{height:18px;margin:0 5px 0 25px;width:18px}.videoAlarmDia .body .numLine .alarmNum{color:#fa4141;font-weight:600}.videoAlarmDia .body .otherAlarm{align-items:center;display:flex}.videoAlarmDia .body .otherAlarm .ant-tag{cursor:pointer;font-size:14px}.videoAlarmDia .body .otherAlarm .tipImg{height:18px;margin-right:5px;width:18px}.videoAlarmDia .body .otherAlarm .annotation{height:12px;margin:2px;width:12px}.videoAlarmDia .body .type1{grid-template-columns:1fr;grid-template-rows:1fr}.videoAlarmDia .body .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.videoAlarmDia .body .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.videoAlarmDia .body .type8 .videoBox:first-child{grid-column:1/4;grid-row:1/4}.videoAlarmDia .body .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.videoAlarmDia .body .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.videoAlarmDia .body .type13 .videoBox:first-child{grid-column:1/3;grid-row:1/3}.videoAlarmDia .body .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}
3
3
  .cloudVideo{height:100%;width:100%}.cloudVideo.noControl .mobile-ez-ptz-container{display:none!important}