inl-ui 0.1.37 → 0.1.38

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");
@@ -9211,7 +9202,7 @@ const VideoBoxV2 = vue.defineComponent({
9211
9202
  signal: 28
9212
9203
  }]];
9213
9204
  const infos = vue.ref([]);
9214
- const uuid = UUID();
9205
+ const uuid = vue.ref(UUID());
9215
9206
  vue.onMounted(() => {
9216
9207
  showInfo.value = _prop.showInfo;
9217
9208
  });
@@ -9288,7 +9279,7 @@ const VideoBoxV2 = vue.defineComponent({
9288
9279
  }
9289
9280
  });
9290
9281
  camera.value = res.data.data;
9291
- streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
9282
+ streams.value = JSON.parse(camera.value?.brandTypePo?.streamTypeDict || "[]");
9292
9283
  };
9293
9284
  let timeout;
9294
9285
  vue.ref(true);
@@ -9296,6 +9287,7 @@ const VideoBoxV2 = vue.defineComponent({
9296
9287
  const fill = vue.ref("fill");
9297
9288
  vue.watch(() => _prop.camera, val => {
9298
9289
  if (val && Object.keys(val).length != 0) {
9290
+ camera.value = void 0;
9299
9291
  getVideoParams(val);
9300
9292
  getVideoDetail(val);
9301
9293
  const fillVal = localStorage.getItem(val);
@@ -9313,27 +9305,27 @@ const VideoBoxV2 = vue.defineComponent({
9313
9305
  token: sessionStorage.getItem("token") || ""
9314
9306
  },
9315
9307
  params: {
9316
- uuid: camera.value.uuid,
9308
+ uuid: camera.value?.uuid,
9317
9309
  chosenStreamType: code
9318
9310
  }
9319
9311
  });
9320
9312
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
9321
9313
  };
9322
9314
  return () => vue.createVNode("div", {
9323
- "id": "videoBox_" + uuid,
9315
+ "id": "videoBox_" + uuid.value,
9324
9316
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
9325
- }, [vue.createVNode(VideoPlayerV2, {
9317
+ }, [camera.value ? vue.createVNode(VideoPlayerV2, {
9326
9318
  "ref": player,
9327
- "domId": uuid,
9319
+ "domId": uuid.value,
9328
9320
  "camera": camera.value,
9329
9321
  "cameraConfig": cameraConfig.value,
9330
9322
  "fill": fill.value,
9331
9323
  "onChangeStream": () => {
9332
9324
  cameraConfig.value = {
9333
- streamType: streamHistory.value || camera.value.streamType
9325
+ streamType: streamHistory.value || camera.value?.streamType
9334
9326
  };
9335
9327
  }
9336
- }, null), showInfo.value ? vue.createVNode("div", {
9328
+ }, null) : "", showInfo.value ? vue.createVNode("div", {
9337
9329
  "class": "selectFields"
9338
9330
  }, [[0, 1, 2, 3, 4, 5].map(index => {
9339
9331
  let info = {};
@@ -9354,7 +9346,7 @@ const VideoBoxV2 = vue.defineComponent({
9354
9346
  }, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
9355
9347
  "class": "tool"
9356
9348
  }, [_prop.btns.map(btn => {
9357
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9349
+ if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9358
9350
  switch (btn) {
9359
9351
  case "fill":
9360
9352
  return vue.createVNode("img", {
@@ -9362,10 +9354,10 @@ const VideoBoxV2 = vue.defineComponent({
9362
9354
  "onClick": e => {
9363
9355
  if (fill.value === "fill") {
9364
9356
  fill.value = "contain";
9365
- localStorage.setItem(camera.value.uuid, fill.value);
9357
+ localStorage.setItem(camera.value?.uuid, fill.value);
9366
9358
  } else {
9367
9359
  fill.value = "fill";
9368
- localStorage.setItem(camera.value.uuid, fill.value);
9360
+ localStorage.setItem(camera.value?.uuid, fill.value);
9369
9361
  }
9370
9362
  },
9371
9363
  "src": "/micro-assets/inl/video/controls/fill.svg"
@@ -9503,13 +9495,13 @@ const PollingPlay = vue.defineComponent({
9503
9495
  fullScreen: false,
9504
9496
  name: ""
9505
9497
  });
9506
- const setCurrentVideos = team => {
9498
+ const setCurrentVideos = async team => {
9507
9499
  data.name = team.pollingGroupName;
9508
9500
  data.showType = `type${team.amount}`;
9509
- data.pointList.length = 0;
9501
+ data.pointList = [];
9510
9502
  for (let i = 0; i < parseInt(team.amount, 10); i++) {
9511
9503
  const video = team.monitorPointPoList[i];
9512
- data.pointList.push(video?.cameraUuid || {});
9504
+ data.pointList.push(video?.cameraUuid || "");
9513
9505
  }
9514
9506
  };
9515
9507
  const findShouldPlay = () => {
@@ -9595,16 +9587,18 @@ const PollingPlay = vue.defineComponent({
9595
9587
  }, null), "\u5168\u5C4F\u663E\u793A"])]) : "", vue.createVNode("div", {
9596
9588
  "id": "grid",
9597
9589
  "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)]))])]);
9590
+ }, [data.pointList.map((item, index) => {
9591
+ return vue.createVNode("div", {
9592
+ "class": "video"
9593
+ }, [_props.version === "V2" ? vue.createVNode(VideoBoxV2, {
9594
+ "camera": item,
9595
+ "btns": _props.btns,
9596
+ "alarm": alarmList.value[index]
9597
+ }, null) : vue.createVNode(VideoBox, {
9598
+ "camera": item,
9599
+ "btns": _props.btns
9600
+ }, null)]);
9601
+ })])]);
9608
9602
  }
9609
9603
  });
9610
9604
  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");
@@ -9200,7 +9191,7 @@ const VideoBoxV2 = defineComponent({
9200
9191
  signal: 28
9201
9192
  }]];
9202
9193
  const infos = ref([]);
9203
- const uuid = UUID();
9194
+ const uuid = ref(UUID());
9204
9195
  onMounted(() => {
9205
9196
  showInfo.value = _prop.showInfo;
9206
9197
  });
@@ -9277,7 +9268,7 @@ const VideoBoxV2 = defineComponent({
9277
9268
  }
9278
9269
  });
9279
9270
  camera.value = res.data.data;
9280
- streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
9271
+ streams.value = JSON.parse(camera.value?.brandTypePo?.streamTypeDict || "[]");
9281
9272
  };
9282
9273
  let timeout;
9283
9274
  ref(true);
@@ -9285,6 +9276,7 @@ const VideoBoxV2 = defineComponent({
9285
9276
  const fill = ref("fill");
9286
9277
  watch(() => _prop.camera, val => {
9287
9278
  if (val && Object.keys(val).length != 0) {
9279
+ camera.value = void 0;
9288
9280
  getVideoParams(val);
9289
9281
  getVideoDetail(val);
9290
9282
  const fillVal = localStorage.getItem(val);
@@ -9302,27 +9294,27 @@ const VideoBoxV2 = defineComponent({
9302
9294
  token: sessionStorage.getItem("token") || ""
9303
9295
  },
9304
9296
  params: {
9305
- uuid: camera.value.uuid,
9297
+ uuid: camera.value?.uuid,
9306
9298
  chosenStreamType: code
9307
9299
  }
9308
9300
  });
9309
9301
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
9310
9302
  };
9311
9303
  return () => createVNode("div", {
9312
- "id": "videoBox_" + uuid,
9304
+ "id": "videoBox_" + uuid.value,
9313
9305
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
9314
- }, [createVNode(VideoPlayerV2, {
9306
+ }, [camera.value ? createVNode(VideoPlayerV2, {
9315
9307
  "ref": player,
9316
- "domId": uuid,
9308
+ "domId": uuid.value,
9317
9309
  "camera": camera.value,
9318
9310
  "cameraConfig": cameraConfig.value,
9319
9311
  "fill": fill.value,
9320
9312
  "onChangeStream": () => {
9321
9313
  cameraConfig.value = {
9322
- streamType: streamHistory.value || camera.value.streamType
9314
+ streamType: streamHistory.value || camera.value?.streamType
9323
9315
  };
9324
9316
  }
9325
- }, null), showInfo.value ? createVNode("div", {
9317
+ }, null) : "", showInfo.value ? createVNode("div", {
9326
9318
  "class": "selectFields"
9327
9319
  }, [[0, 1, 2, 3, 4, 5].map(index => {
9328
9320
  let info = {};
@@ -9343,7 +9335,7 @@ const VideoBoxV2 = defineComponent({
9343
9335
  }, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
9344
9336
  "class": "tool"
9345
9337
  }, [_prop.btns.map(btn => {
9346
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9338
+ if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9347
9339
  switch (btn) {
9348
9340
  case "fill":
9349
9341
  return createVNode("img", {
@@ -9351,10 +9343,10 @@ const VideoBoxV2 = defineComponent({
9351
9343
  "onClick": e => {
9352
9344
  if (fill.value === "fill") {
9353
9345
  fill.value = "contain";
9354
- localStorage.setItem(camera.value.uuid, fill.value);
9346
+ localStorage.setItem(camera.value?.uuid, fill.value);
9355
9347
  } else {
9356
9348
  fill.value = "fill";
9357
- localStorage.setItem(camera.value.uuid, fill.value);
9349
+ localStorage.setItem(camera.value?.uuid, fill.value);
9358
9350
  }
9359
9351
  },
9360
9352
  "src": "/micro-assets/inl/video/controls/fill.svg"
@@ -9492,13 +9484,13 @@ const PollingPlay = defineComponent({
9492
9484
  fullScreen: false,
9493
9485
  name: ""
9494
9486
  });
9495
- const setCurrentVideos = team => {
9487
+ const setCurrentVideos = async team => {
9496
9488
  data.name = team.pollingGroupName;
9497
9489
  data.showType = `type${team.amount}`;
9498
- data.pointList.length = 0;
9490
+ data.pointList = [];
9499
9491
  for (let i = 0; i < parseInt(team.amount, 10); i++) {
9500
9492
  const video = team.monitorPointPoList[i];
9501
- data.pointList.push(video?.cameraUuid || {});
9493
+ data.pointList.push(video?.cameraUuid || "");
9502
9494
  }
9503
9495
  };
9504
9496
  const findShouldPlay = () => {
@@ -9584,16 +9576,18 @@ const PollingPlay = defineComponent({
9584
9576
  }, null), "\u5168\u5C4F\u663E\u793A"])]) : "", createVNode("div", {
9585
9577
  "id": "grid",
9586
9578
  "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)]))])]);
9579
+ }, [data.pointList.map((item, index) => {
9580
+ return createVNode("div", {
9581
+ "class": "video"
9582
+ }, [_props.version === "V2" ? createVNode(VideoBoxV2, {
9583
+ "camera": item,
9584
+ "btns": _props.btns,
9585
+ "alarm": alarmList.value[index]
9586
+ }, null) : createVNode(VideoBox, {
9587
+ "camera": item,
9588
+ "btns": _props.btns
9589
+ }, null)]);
9590
+ })])]);
9597
9591
  }
9598
9592
  });
9599
9593
  var pollingPlay = installComponent(PollingPlay, "polling-play");
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.36";
48
+ var version = "0.1.37";
49
49
 
50
50
  const setTheme = theme => {
51
51
  if (theme === "dark") {
@@ -9775,14 +9775,6 @@ const VideoPlayerV2 = vue.defineComponent({
9775
9775
  }
9776
9776
  });
9777
9777
  };
9778
- const stopV = id => {
9779
- const videoElement = document.getElementById(id);
9780
- if (videoElement) {
9781
- videoElement.pause();
9782
- videoElement.removeAttribute("src");
9783
- videoElement.load();
9784
- }
9785
- };
9786
9778
  const releaseUrl = vue.ref("");
9787
9779
  const release = async () => {
9788
9780
  const res = await axios__default["default"].get(releaseUrl.value);
@@ -9832,7 +9824,6 @@ const VideoPlayerV2 = vue.defineComponent({
9832
9824
  };
9833
9825
  vue.watch([() => _prop.camera, () => _prop.cameraConfig], ([camera, cameraConfig]) => {
9834
9826
  stopPlay();
9835
- stopV(`videoPlayer_${uuid}`);
9836
9827
  getVideoDetail(camera);
9837
9828
  }, {
9838
9829
  immediate: true,
@@ -9840,27 +9831,27 @@ const VideoPlayerV2 = vue.defineComponent({
9840
9831
  });
9841
9832
  vue.onBeforeUnmount(() => {
9842
9833
  stopPlay();
9843
- const videoElement = document.getElementById(`videoPlayer_${uuid}`);
9844
- if (videoElement) {
9845
- videoElement.pause();
9846
- videoElement.src = null;
9847
- videoElement.srcObject = null;
9848
- videoElement.remove();
9849
- }
9850
9834
  });
9851
- return () => videoInfo2.value.brandTypeCode !== "MP4" ? vue.createVNode("video", {
9852
- "id": `videoPlayer_${uuid}`,
9853
- "class": `videoComponent ${_prop.fill}`,
9854
- "muted": true,
9855
- "autoplay": true
9856
- }, null) : vue.createVNode("video", {
9857
- "id": `videoPlayer_${uuid}`,
9858
- "class": "videoComponent fill",
9859
- "src": videoInfo2.value.mp4ResourcesPath,
9860
- "autoplay": true,
9861
- "loop": true,
9862
- "muted": true
9863
- }, null);
9835
+ const renderVideo = () => {
9836
+ if (videoInfo2.value.brandTypeCode === "MP4") {
9837
+ return vue.createVNode("video", {
9838
+ "id": `mp4Player_${uuid}`,
9839
+ "class": "videoComponent fill",
9840
+ "src": videoInfo2.value.mp4ResourcesPath,
9841
+ "autoplay": true,
9842
+ "loop": true,
9843
+ "muted": true
9844
+ }, null);
9845
+ } else {
9846
+ return vue.createVNode("video", {
9847
+ "id": `videoPlayer_${uuid}`,
9848
+ "class": `videoComponent ${_prop.fill}`,
9849
+ "muted": true,
9850
+ "autoplay": true
9851
+ }, null);
9852
+ }
9853
+ };
9854
+ return () => vue.createVNode(vue.Fragment, null, [renderVideo()]);
9864
9855
  }
9865
9856
  });
9866
9857
  var videoPlayerV2 = installComponent(VideoPlayerV2, "video-player-v2");
@@ -10214,7 +10205,7 @@ const VideoBoxV2 = vue.defineComponent({
10214
10205
  signal: 28
10215
10206
  }]];
10216
10207
  const infos = vue.ref([]);
10217
- const uuid = UUID();
10208
+ const uuid = vue.ref(UUID());
10218
10209
  vue.onMounted(() => {
10219
10210
  showInfo.value = _prop.showInfo;
10220
10211
  });
@@ -10291,7 +10282,7 @@ const VideoBoxV2 = vue.defineComponent({
10291
10282
  }
10292
10283
  });
10293
10284
  camera.value = res.data.data;
10294
- streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
10285
+ streams.value = JSON.parse(camera.value?.brandTypePo?.streamTypeDict || "[]");
10295
10286
  };
10296
10287
  let timeout;
10297
10288
  vue.ref(true);
@@ -10299,6 +10290,7 @@ const VideoBoxV2 = vue.defineComponent({
10299
10290
  const fill = vue.ref("fill");
10300
10291
  vue.watch(() => _prop.camera, val => {
10301
10292
  if (val && Object.keys(val).length != 0) {
10293
+ camera.value = void 0;
10302
10294
  getVideoParams(val);
10303
10295
  getVideoDetail(val);
10304
10296
  const fillVal = localStorage.getItem(val);
@@ -10316,27 +10308,27 @@ const VideoBoxV2 = vue.defineComponent({
10316
10308
  token: sessionStorage.getItem("token") || ""
10317
10309
  },
10318
10310
  params: {
10319
- uuid: camera.value.uuid,
10311
+ uuid: camera.value?.uuid,
10320
10312
  chosenStreamType: code
10321
10313
  }
10322
10314
  });
10323
10315
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
10324
10316
  };
10325
10317
  return () => vue.createVNode("div", {
10326
- "id": "videoBox_" + uuid,
10318
+ "id": "videoBox_" + uuid.value,
10327
10319
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
10328
- }, [vue.createVNode(VideoPlayerV2, {
10320
+ }, [camera.value ? vue.createVNode(VideoPlayerV2, {
10329
10321
  "ref": player,
10330
- "domId": uuid,
10322
+ "domId": uuid.value,
10331
10323
  "camera": camera.value,
10332
10324
  "cameraConfig": cameraConfig.value,
10333
10325
  "fill": fill.value,
10334
10326
  "onChangeStream": () => {
10335
10327
  cameraConfig.value = {
10336
- streamType: streamHistory.value || camera.value.streamType
10328
+ streamType: streamHistory.value || camera.value?.streamType
10337
10329
  };
10338
10330
  }
10339
- }, null), showInfo.value ? vue.createVNode("div", {
10331
+ }, null) : "", showInfo.value ? vue.createVNode("div", {
10340
10332
  "class": "selectFields"
10341
10333
  }, [[0, 1, 2, 3, 4, 5].map(index => {
10342
10334
  let info = {};
@@ -10357,7 +10349,7 @@ const VideoBoxV2 = vue.defineComponent({
10357
10349
  }, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
10358
10350
  "class": "tool"
10359
10351
  }, [_prop.btns.map(btn => {
10360
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
10352
+ if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
10361
10353
  switch (btn) {
10362
10354
  case "fill":
10363
10355
  return vue.createVNode("img", {
@@ -10365,10 +10357,10 @@ const VideoBoxV2 = vue.defineComponent({
10365
10357
  "onClick": e => {
10366
10358
  if (fill.value === "fill") {
10367
10359
  fill.value = "contain";
10368
- localStorage.setItem(camera.value.uuid, fill.value);
10360
+ localStorage.setItem(camera.value?.uuid, fill.value);
10369
10361
  } else {
10370
10362
  fill.value = "fill";
10371
- localStorage.setItem(camera.value.uuid, fill.value);
10363
+ localStorage.setItem(camera.value?.uuid, fill.value);
10372
10364
  }
10373
10365
  },
10374
10366
  "src": "/micro-assets/inl/video/controls/fill.svg"
@@ -10506,13 +10498,13 @@ const PollingPlay = vue.defineComponent({
10506
10498
  fullScreen: false,
10507
10499
  name: ""
10508
10500
  });
10509
- const setCurrentVideos = team => {
10501
+ const setCurrentVideos = async team => {
10510
10502
  data.name = team.pollingGroupName;
10511
10503
  data.showType = `type${team.amount}`;
10512
- data.pointList.length = 0;
10504
+ data.pointList = [];
10513
10505
  for (let i = 0; i < parseInt(team.amount, 10); i++) {
10514
10506
  const video = team.monitorPointPoList[i];
10515
- data.pointList.push(video?.cameraUuid || {});
10507
+ data.pointList.push(video?.cameraUuid || "");
10516
10508
  }
10517
10509
  };
10518
10510
  const findShouldPlay = () => {
@@ -10598,16 +10590,18 @@ const PollingPlay = vue.defineComponent({
10598
10590
  }, null), "\u5168\u5C4F\u663E\u793A"])]) : "", vue.createVNode("div", {
10599
10591
  "id": "grid",
10600
10592
  "class": ["grid", data.showType, data.fullScreen ? "full" : ""]
10601
- }, [data.pointList.map((item, index) => vue.createVNode("div", {
10602
- "class": "video"
10603
- }, [_props.version === "V2" ? vue.createVNode(VideoBoxV2, {
10604
- "camera": item,
10605
- "btns": _props.btns,
10606
- "alarm": alarmList.value[index]
10607
- }, null) : vue.createVNode(VideoBox, {
10608
- "camera": item,
10609
- "btns": _props.btns
10610
- }, null)]))])]);
10593
+ }, [data.pointList.map((item, index) => {
10594
+ return vue.createVNode("div", {
10595
+ "class": "video"
10596
+ }, [_props.version === "V2" ? vue.createVNode(VideoBoxV2, {
10597
+ "camera": item,
10598
+ "btns": _props.btns,
10599
+ "alarm": alarmList.value[index]
10600
+ }, null) : vue.createVNode(VideoBox, {
10601
+ "camera": item,
10602
+ "btns": _props.btns
10603
+ }, null)]);
10604
+ })])]);
10611
10605
  }
10612
10606
  });
10613
10607
  var pollingPlay = installComponent(PollingPlay, "polling-play");
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.36";
14
+ var version = "0.1.37";
15
15
 
16
16
  declare const _default$p: {
17
17
  set(theme: string): void;