inl-ui 0.1.35 → 0.1.37

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.
@@ -8715,6 +8715,10 @@ const props$8 = {
8715
8715
  baseUrl: {
8716
8716
  type: String,
8717
8717
  default: ""
8718
+ },
8719
+ domId: {
8720
+ type: String,
8721
+ default: ""
8718
8722
  }
8719
8723
  };
8720
8724
  const VideoPlayerV2 = vue.defineComponent({
@@ -8722,7 +8726,7 @@ const VideoPlayerV2 = vue.defineComponent({
8722
8726
  emits: ["changeStream"],
8723
8727
  setup(_prop, _context) {
8724
8728
  let play;
8725
- const uuid = UUID();
8729
+ const uuid = _prop.domId;
8726
8730
  const videoFull = id => {
8727
8731
  const elm = document.getElementById(`videoPlayer_${uuid}`);
8728
8732
  if (elm.requestFullScreen) {
@@ -8732,11 +8736,13 @@ const VideoPlayerV2 = vue.defineComponent({
8732
8736
  } else if (elm.webkitRequestFullScreen) {
8733
8737
  elm.webkitRequestFullScreen();
8734
8738
  }
8735
- setTimeout(() => {
8736
- window.onresize = () => {
8737
- _context.emit("changeStream");
8738
- };
8739
- }, 500);
8739
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
8740
+ setTimeout(() => {
8741
+ window.onresize = () => {
8742
+ _context.emit("changeStream");
8743
+ };
8744
+ }, 500);
8745
+ }
8740
8746
  };
8741
8747
  const videoInfo2 = vue.ref({});
8742
8748
  const stopPlay = () => {
@@ -8803,18 +8809,20 @@ const VideoPlayerV2 = vue.defineComponent({
8803
8809
  token: _prop.token || sessionStorage.getItem("token") || ""
8804
8810
  }
8805
8811
  });
8812
+ const {
8813
+ data
8814
+ } = detailRes;
8815
+ videoInfo2.value = {
8816
+ ...data.data,
8817
+ ..._prop.cameraConfig
8818
+ };
8806
8819
  if (res.status === 200) {
8807
- const {
8808
- data
8809
- } = detailRes;
8810
8820
  if (res.data.data[0]) {
8811
- data.data.webrtcTemplateMerged = res.data.data[0];
8821
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
8812
8822
  releaseUrl.value = res.data.data[1];
8813
- data.data.mediaServerPo.url = res.data.data[2];
8814
- videoInfo2.value = {
8815
- ...data.data,
8816
- ..._prop.cameraConfig
8817
- };
8823
+ if (videoInfo2.value.mediaServerPo) {
8824
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
8825
+ }
8818
8826
  init();
8819
8827
  }
8820
8828
  }
@@ -8843,6 +8851,7 @@ const VideoPlayerV2 = vue.defineComponent({
8843
8851
  "muted": true,
8844
8852
  "autoplay": true
8845
8853
  }, null) : vue.createVNode("video", {
8854
+ "id": `videoPlayer_${uuid}`,
8846
8855
  "class": "videoComponent fill",
8847
8856
  "src": videoInfo2.value.mp4ResourcesPath,
8848
8857
  "autoplay": true,
@@ -9202,6 +9211,7 @@ const VideoBoxV2 = vue.defineComponent({
9202
9211
  signal: 28
9203
9212
  }]];
9204
9213
  const infos = vue.ref([]);
9214
+ const uuid = UUID();
9205
9215
  vue.onMounted(() => {
9206
9216
  showInfo.value = _prop.showInfo;
9207
9217
  });
@@ -9248,12 +9258,12 @@ const VideoBoxV2 = vue.defineComponent({
9248
9258
  }
9249
9259
  });
9250
9260
  };
9251
- const getVideoParams = async uuid => {
9261
+ const getVideoParams = async uuid2 => {
9252
9262
  const arr = infos.value.map(info => {
9253
9263
  return {};
9254
9264
  });
9255
9265
  const res = await axios__default["default"].post("/api/vms/v1/cameraRelThing/getByParam", {
9256
- cameraUuid: uuid
9266
+ cameraUuid: uuid2
9257
9267
  }, {
9258
9268
  headers: {
9259
9269
  token: sessionStorage.getItem("token")
@@ -9310,9 +9320,11 @@ const VideoBoxV2 = vue.defineComponent({
9310
9320
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
9311
9321
  };
9312
9322
  return () => vue.createVNode("div", {
9323
+ "id": "videoBox_" + uuid,
9313
9324
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
9314
9325
  }, [vue.createVNode(VideoPlayerV2, {
9315
9326
  "ref": player,
9327
+ "domId": uuid,
9316
9328
  "camera": camera.value,
9317
9329
  "cameraConfig": cameraConfig.value,
9318
9330
  "fill": fill.value,
@@ -9321,7 +9333,7 @@ const VideoBoxV2 = vue.defineComponent({
9321
9333
  streamType: streamHistory.value || camera.value.streamType
9322
9334
  };
9323
9335
  }
9324
- }, null), camera.value.brandTypeCode !== "MP4" && showInfo.value ? vue.createVNode("div", {
9336
+ }, null), showInfo.value ? vue.createVNode("div", {
9325
9337
  "class": "selectFields"
9326
9338
  }, [[0, 1, 2, 3, 4, 5].map(index => {
9327
9339
  let info = {};
@@ -9342,7 +9354,7 @@ const VideoBoxV2 = vue.defineComponent({
9342
9354
  }, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
9343
9355
  "class": "tool"
9344
9356
  }, [_prop.btns.map(btn => {
9345
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "look")) {
9357
+ if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9346
9358
  switch (btn) {
9347
9359
  case "fill":
9348
9360
  return vue.createVNode("img", {
@@ -448,7 +448,7 @@ declare const _default$b: vue.DefineComponent<{
448
448
  }, {}>;
449
449
 
450
450
  interface videoInfo$1 {
451
- [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1>;
451
+ [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1> | any;
452
452
  }
453
453
 
454
454
  declare const _default$a: vue.DefineComponent<{
@@ -472,6 +472,10 @@ declare const _default$a: vue.DefineComponent<{
472
472
  type: StringConstructor;
473
473
  default: string;
474
474
  };
475
+ domId: {
476
+ type: StringConstructor;
477
+ default: string;
478
+ };
475
479
  }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "changeStream"[], "changeStream", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
476
480
  camera: {
477
481
  require: boolean;
@@ -493,6 +497,10 @@ declare const _default$a: vue.DefineComponent<{
493
497
  type: StringConstructor;
494
498
  default: string;
495
499
  };
500
+ domId: {
501
+ type: StringConstructor;
502
+ default: string;
503
+ };
496
504
  }>> & {
497
505
  onChangeStream?: ((...args: any[]) => any) | undefined;
498
506
  }, {
@@ -500,6 +508,7 @@ declare const _default$a: vue.DefineComponent<{
500
508
  cameraConfig: Record<string, any>;
501
509
  token: string;
502
510
  baseUrl: string;
511
+ domId: string;
503
512
  }, {}>;
504
513
 
505
514
  interface videoInfo {
@@ -8704,6 +8704,10 @@ const props$8 = {
8704
8704
  baseUrl: {
8705
8705
  type: String,
8706
8706
  default: ""
8707
+ },
8708
+ domId: {
8709
+ type: String,
8710
+ default: ""
8707
8711
  }
8708
8712
  };
8709
8713
  const VideoPlayerV2 = defineComponent({
@@ -8711,7 +8715,7 @@ const VideoPlayerV2 = defineComponent({
8711
8715
  emits: ["changeStream"],
8712
8716
  setup(_prop, _context) {
8713
8717
  let play;
8714
- const uuid = UUID();
8718
+ const uuid = _prop.domId;
8715
8719
  const videoFull = id => {
8716
8720
  const elm = document.getElementById(`videoPlayer_${uuid}`);
8717
8721
  if (elm.requestFullScreen) {
@@ -8721,11 +8725,13 @@ const VideoPlayerV2 = defineComponent({
8721
8725
  } else if (elm.webkitRequestFullScreen) {
8722
8726
  elm.webkitRequestFullScreen();
8723
8727
  }
8724
- setTimeout(() => {
8725
- window.onresize = () => {
8726
- _context.emit("changeStream");
8727
- };
8728
- }, 500);
8728
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
8729
+ setTimeout(() => {
8730
+ window.onresize = () => {
8731
+ _context.emit("changeStream");
8732
+ };
8733
+ }, 500);
8734
+ }
8729
8735
  };
8730
8736
  const videoInfo2 = ref({});
8731
8737
  const stopPlay = () => {
@@ -8792,18 +8798,20 @@ const VideoPlayerV2 = defineComponent({
8792
8798
  token: _prop.token || sessionStorage.getItem("token") || ""
8793
8799
  }
8794
8800
  });
8801
+ const {
8802
+ data
8803
+ } = detailRes;
8804
+ videoInfo2.value = {
8805
+ ...data.data,
8806
+ ..._prop.cameraConfig
8807
+ };
8795
8808
  if (res.status === 200) {
8796
- const {
8797
- data
8798
- } = detailRes;
8799
8809
  if (res.data.data[0]) {
8800
- data.data.webrtcTemplateMerged = res.data.data[0];
8810
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
8801
8811
  releaseUrl.value = res.data.data[1];
8802
- data.data.mediaServerPo.url = res.data.data[2];
8803
- videoInfo2.value = {
8804
- ...data.data,
8805
- ..._prop.cameraConfig
8806
- };
8812
+ if (videoInfo2.value.mediaServerPo) {
8813
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
8814
+ }
8807
8815
  init();
8808
8816
  }
8809
8817
  }
@@ -8832,6 +8840,7 @@ const VideoPlayerV2 = defineComponent({
8832
8840
  "muted": true,
8833
8841
  "autoplay": true
8834
8842
  }, null) : createVNode("video", {
8843
+ "id": `videoPlayer_${uuid}`,
8835
8844
  "class": "videoComponent fill",
8836
8845
  "src": videoInfo2.value.mp4ResourcesPath,
8837
8846
  "autoplay": true,
@@ -9191,6 +9200,7 @@ const VideoBoxV2 = defineComponent({
9191
9200
  signal: 28
9192
9201
  }]];
9193
9202
  const infos = ref([]);
9203
+ const uuid = UUID();
9194
9204
  onMounted(() => {
9195
9205
  showInfo.value = _prop.showInfo;
9196
9206
  });
@@ -9237,12 +9247,12 @@ const VideoBoxV2 = defineComponent({
9237
9247
  }
9238
9248
  });
9239
9249
  };
9240
- const getVideoParams = async uuid => {
9250
+ const getVideoParams = async uuid2 => {
9241
9251
  const arr = infos.value.map(info => {
9242
9252
  return {};
9243
9253
  });
9244
9254
  const res = await axios$2.post("/api/vms/v1/cameraRelThing/getByParam", {
9245
- cameraUuid: uuid
9255
+ cameraUuid: uuid2
9246
9256
  }, {
9247
9257
  headers: {
9248
9258
  token: sessionStorage.getItem("token")
@@ -9299,9 +9309,11 @@ const VideoBoxV2 = defineComponent({
9299
9309
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
9300
9310
  };
9301
9311
  return () => createVNode("div", {
9312
+ "id": "videoBox_" + uuid,
9302
9313
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
9303
9314
  }, [createVNode(VideoPlayerV2, {
9304
9315
  "ref": player,
9316
+ "domId": uuid,
9305
9317
  "camera": camera.value,
9306
9318
  "cameraConfig": cameraConfig.value,
9307
9319
  "fill": fill.value,
@@ -9310,7 +9322,7 @@ const VideoBoxV2 = defineComponent({
9310
9322
  streamType: streamHistory.value || camera.value.streamType
9311
9323
  };
9312
9324
  }
9313
- }, null), camera.value.brandTypeCode !== "MP4" && showInfo.value ? createVNode("div", {
9325
+ }, null), showInfo.value ? createVNode("div", {
9314
9326
  "class": "selectFields"
9315
9327
  }, [[0, 1, 2, 3, 4, 5].map(index => {
9316
9328
  let info = {};
@@ -9331,7 +9343,7 @@ const VideoBoxV2 = defineComponent({
9331
9343
  }, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
9332
9344
  "class": "tool"
9333
9345
  }, [_prop.btns.map(btn => {
9334
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "look")) {
9346
+ if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
9335
9347
  switch (btn) {
9336
9348
  case "fill":
9337
9349
  return createVNode("img", {
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.34";
48
+ var version = "0.1.36";
49
49
 
50
50
  const setTheme = theme => {
51
51
  if (theme === "dark") {
@@ -9718,6 +9718,10 @@ const props$8 = {
9718
9718
  baseUrl: {
9719
9719
  type: String,
9720
9720
  default: ""
9721
+ },
9722
+ domId: {
9723
+ type: String,
9724
+ default: ""
9721
9725
  }
9722
9726
  };
9723
9727
  const VideoPlayerV2 = vue.defineComponent({
@@ -9725,7 +9729,7 @@ const VideoPlayerV2 = vue.defineComponent({
9725
9729
  emits: ["changeStream"],
9726
9730
  setup(_prop, _context) {
9727
9731
  let play;
9728
- const uuid = UUID();
9732
+ const uuid = _prop.domId;
9729
9733
  const videoFull = id => {
9730
9734
  const elm = document.getElementById(`videoPlayer_${uuid}`);
9731
9735
  if (elm.requestFullScreen) {
@@ -9735,11 +9739,13 @@ const VideoPlayerV2 = vue.defineComponent({
9735
9739
  } else if (elm.webkitRequestFullScreen) {
9736
9740
  elm.webkitRequestFullScreen();
9737
9741
  }
9738
- setTimeout(() => {
9739
- window.onresize = () => {
9740
- _context.emit("changeStream");
9741
- };
9742
- }, 500);
9742
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
9743
+ setTimeout(() => {
9744
+ window.onresize = () => {
9745
+ _context.emit("changeStream");
9746
+ };
9747
+ }, 500);
9748
+ }
9743
9749
  };
9744
9750
  const videoInfo2 = vue.ref({});
9745
9751
  const stopPlay = () => {
@@ -9806,18 +9812,20 @@ const VideoPlayerV2 = vue.defineComponent({
9806
9812
  token: _prop.token || sessionStorage.getItem("token") || ""
9807
9813
  }
9808
9814
  });
9815
+ const {
9816
+ data
9817
+ } = detailRes;
9818
+ videoInfo2.value = {
9819
+ ...data.data,
9820
+ ..._prop.cameraConfig
9821
+ };
9809
9822
  if (res.status === 200) {
9810
- const {
9811
- data
9812
- } = detailRes;
9813
9823
  if (res.data.data[0]) {
9814
- data.data.webrtcTemplateMerged = res.data.data[0];
9824
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
9815
9825
  releaseUrl.value = res.data.data[1];
9816
- data.data.mediaServerPo.url = res.data.data[2];
9817
- videoInfo2.value = {
9818
- ...data.data,
9819
- ..._prop.cameraConfig
9820
- };
9826
+ if (videoInfo2.value.mediaServerPo) {
9827
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
9828
+ }
9821
9829
  init();
9822
9830
  }
9823
9831
  }
@@ -9846,6 +9854,7 @@ const VideoPlayerV2 = vue.defineComponent({
9846
9854
  "muted": true,
9847
9855
  "autoplay": true
9848
9856
  }, null) : vue.createVNode("video", {
9857
+ "id": `videoPlayer_${uuid}`,
9849
9858
  "class": "videoComponent fill",
9850
9859
  "src": videoInfo2.value.mp4ResourcesPath,
9851
9860
  "autoplay": true,
@@ -10205,6 +10214,7 @@ const VideoBoxV2 = vue.defineComponent({
10205
10214
  signal: 28
10206
10215
  }]];
10207
10216
  const infos = vue.ref([]);
10217
+ const uuid = UUID();
10208
10218
  vue.onMounted(() => {
10209
10219
  showInfo.value = _prop.showInfo;
10210
10220
  });
@@ -10251,12 +10261,12 @@ const VideoBoxV2 = vue.defineComponent({
10251
10261
  }
10252
10262
  });
10253
10263
  };
10254
- const getVideoParams = async uuid => {
10264
+ const getVideoParams = async uuid2 => {
10255
10265
  const arr = infos.value.map(info => {
10256
10266
  return {};
10257
10267
  });
10258
10268
  const res = await axios__default["default"].post("/api/vms/v1/cameraRelThing/getByParam", {
10259
- cameraUuid: uuid
10269
+ cameraUuid: uuid2
10260
10270
  }, {
10261
10271
  headers: {
10262
10272
  token: sessionStorage.getItem("token")
@@ -10313,9 +10323,11 @@ const VideoBoxV2 = vue.defineComponent({
10313
10323
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
10314
10324
  };
10315
10325
  return () => vue.createVNode("div", {
10326
+ "id": "videoBox_" + uuid,
10316
10327
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
10317
10328
  }, [vue.createVNode(VideoPlayerV2, {
10318
10329
  "ref": player,
10330
+ "domId": uuid,
10319
10331
  "camera": camera.value,
10320
10332
  "cameraConfig": cameraConfig.value,
10321
10333
  "fill": fill.value,
@@ -10324,7 +10336,7 @@ const VideoBoxV2 = vue.defineComponent({
10324
10336
  streamType: streamHistory.value || camera.value.streamType
10325
10337
  };
10326
10338
  }
10327
- }, null), camera.value.brandTypeCode !== "MP4" && showInfo.value ? vue.createVNode("div", {
10339
+ }, null), showInfo.value ? vue.createVNode("div", {
10328
10340
  "class": "selectFields"
10329
10341
  }, [[0, 1, 2, 3, 4, 5].map(index => {
10330
10342
  let info = {};
@@ -10345,7 +10357,7 @@ const VideoBoxV2 = vue.defineComponent({
10345
10357
  }, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
10346
10358
  "class": "tool"
10347
10359
  }, [_prop.btns.map(btn => {
10348
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "look")) {
10360
+ if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
10349
10361
  switch (btn) {
10350
10362
  case "fill":
10351
10363
  return vue.createVNode("img", {
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.34";
14
+ var version = "0.1.36";
15
15
 
16
16
  declare const _default$p: {
17
17
  set(theme: string): void;
@@ -397,7 +397,7 @@ type RequetFunction = (...args: any[]) => any;
397
397
  declare function usePoolingReq(reqFn: RequetFunction, isInterval?: MaybeComputedRef<Boolean>, interval?: number): void;
398
398
 
399
399
  interface videoInfo$1 {
400
- [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1>;
400
+ [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1> | any;
401
401
  }
402
402
  interface PlayVideoArgs {
403
403
  videoElm: string;
@@ -1233,6 +1233,10 @@ declare const _default$b: vue.DefineComponent<{
1233
1233
  type: StringConstructor;
1234
1234
  default: string;
1235
1235
  };
1236
+ domId: {
1237
+ type: StringConstructor;
1238
+ default: string;
1239
+ };
1236
1240
  }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "changeStream"[], "changeStream", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
1237
1241
  camera: {
1238
1242
  require: boolean;
@@ -1254,11 +1258,16 @@ declare const _default$b: vue.DefineComponent<{
1254
1258
  type: StringConstructor;
1255
1259
  default: string;
1256
1260
  };
1261
+ domId: {
1262
+ type: StringConstructor;
1263
+ default: string;
1264
+ };
1257
1265
  }>> & {
1258
1266
  onChangeStream?: ((...args: any[]) => any) | undefined;
1259
1267
  }, {
1260
1268
  fill: string;
1261
1269
  token: string;
1270
+ domId: string;
1262
1271
  cameraConfig: Record<string, any>;
1263
1272
  baseUrl: string;
1264
1273
  }, {}>;
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.34";
17
+ var version = "0.1.36";
18
18
 
19
19
  const setTheme = theme => {
20
20
  if (theme === "dark") {
@@ -9687,6 +9687,10 @@ const props$8 = {
9687
9687
  baseUrl: {
9688
9688
  type: String,
9689
9689
  default: ""
9690
+ },
9691
+ domId: {
9692
+ type: String,
9693
+ default: ""
9690
9694
  }
9691
9695
  };
9692
9696
  const VideoPlayerV2 = defineComponent({
@@ -9694,7 +9698,7 @@ const VideoPlayerV2 = defineComponent({
9694
9698
  emits: ["changeStream"],
9695
9699
  setup(_prop, _context) {
9696
9700
  let play;
9697
- const uuid = UUID();
9701
+ const uuid = _prop.domId;
9698
9702
  const videoFull = id => {
9699
9703
  const elm = document.getElementById(`videoPlayer_${uuid}`);
9700
9704
  if (elm.requestFullScreen) {
@@ -9704,11 +9708,13 @@ const VideoPlayerV2 = defineComponent({
9704
9708
  } else if (elm.webkitRequestFullScreen) {
9705
9709
  elm.webkitRequestFullScreen();
9706
9710
  }
9707
- setTimeout(() => {
9708
- window.onresize = () => {
9709
- _context.emit("changeStream");
9710
- };
9711
- }, 500);
9711
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
9712
+ setTimeout(() => {
9713
+ window.onresize = () => {
9714
+ _context.emit("changeStream");
9715
+ };
9716
+ }, 500);
9717
+ }
9712
9718
  };
9713
9719
  const videoInfo2 = ref({});
9714
9720
  const stopPlay = () => {
@@ -9775,18 +9781,20 @@ const VideoPlayerV2 = defineComponent({
9775
9781
  token: _prop.token || sessionStorage.getItem("token") || ""
9776
9782
  }
9777
9783
  });
9784
+ const {
9785
+ data
9786
+ } = detailRes;
9787
+ videoInfo2.value = {
9788
+ ...data.data,
9789
+ ..._prop.cameraConfig
9790
+ };
9778
9791
  if (res.status === 200) {
9779
- const {
9780
- data
9781
- } = detailRes;
9782
9792
  if (res.data.data[0]) {
9783
- data.data.webrtcTemplateMerged = res.data.data[0];
9793
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
9784
9794
  releaseUrl.value = res.data.data[1];
9785
- data.data.mediaServerPo.url = res.data.data[2];
9786
- videoInfo2.value = {
9787
- ...data.data,
9788
- ..._prop.cameraConfig
9789
- };
9795
+ if (videoInfo2.value.mediaServerPo) {
9796
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
9797
+ }
9790
9798
  init();
9791
9799
  }
9792
9800
  }
@@ -9815,6 +9823,7 @@ const VideoPlayerV2 = defineComponent({
9815
9823
  "muted": true,
9816
9824
  "autoplay": true
9817
9825
  }, null) : createVNode("video", {
9826
+ "id": `videoPlayer_${uuid}`,
9818
9827
  "class": "videoComponent fill",
9819
9828
  "src": videoInfo2.value.mp4ResourcesPath,
9820
9829
  "autoplay": true,
@@ -10174,6 +10183,7 @@ const VideoBoxV2 = defineComponent({
10174
10183
  signal: 28
10175
10184
  }]];
10176
10185
  const infos = ref([]);
10186
+ const uuid = UUID();
10177
10187
  onMounted(() => {
10178
10188
  showInfo.value = _prop.showInfo;
10179
10189
  });
@@ -10220,12 +10230,12 @@ const VideoBoxV2 = defineComponent({
10220
10230
  }
10221
10231
  });
10222
10232
  };
10223
- const getVideoParams = async uuid => {
10233
+ const getVideoParams = async uuid2 => {
10224
10234
  const arr = infos.value.map(info => {
10225
10235
  return {};
10226
10236
  });
10227
10237
  const res = await axios$2.post("/api/vms/v1/cameraRelThing/getByParam", {
10228
- cameraUuid: uuid
10238
+ cameraUuid: uuid2
10229
10239
  }, {
10230
10240
  headers: {
10231
10241
  token: sessionStorage.getItem("token")
@@ -10282,9 +10292,11 @@ const VideoBoxV2 = defineComponent({
10282
10292
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
10283
10293
  };
10284
10294
  return () => createVNode("div", {
10295
+ "id": "videoBox_" + uuid,
10285
10296
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
10286
10297
  }, [createVNode(VideoPlayerV2, {
10287
10298
  "ref": player,
10299
+ "domId": uuid,
10288
10300
  "camera": camera.value,
10289
10301
  "cameraConfig": cameraConfig.value,
10290
10302
  "fill": fill.value,
@@ -10293,7 +10305,7 @@ const VideoBoxV2 = defineComponent({
10293
10305
  streamType: streamHistory.value || camera.value.streamType
10294
10306
  };
10295
10307
  }
10296
- }, null), camera.value.brandTypeCode !== "MP4" && showInfo.value ? createVNode("div", {
10308
+ }, null), showInfo.value ? createVNode("div", {
10297
10309
  "class": "selectFields"
10298
10310
  }, [[0, 1, 2, 3, 4, 5].map(index => {
10299
10311
  let info = {};
@@ -10314,7 +10326,7 @@ const VideoBoxV2 = defineComponent({
10314
10326
  }, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
10315
10327
  "class": "tool"
10316
10328
  }, [_prop.btns.map(btn => {
10317
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "look")) {
10329
+ if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
10318
10330
  switch (btn) {
10319
10331
  case "fill":
10320
10332
  return createVNode("img", {
@@ -1,5 +1,5 @@
1
1
  interface videoInfo {
2
- [key: string]: string | number | boolean | videoInfo | Array<videoInfo>;
2
+ [key: string]: string | number | boolean | videoInfo | Array<videoInfo> | any;
3
3
  }
4
4
  interface PlayVideoArgs {
5
5
  videoElm: string;
@@ -5876,14 +5876,6 @@ class WebRtcMt$1 {
5876
5876
  }
5877
5877
  }
5878
5878
 
5879
- const UUID = (n = 16) => {
5880
- return "xxxx-xx-4x-yx-xx".replace(/[xy]/g, c => {
5881
- const r = Math.random() * 16 | 0,
5882
- v = c == "x" ? r : r & 3 | 8;
5883
- return v.toString(n);
5884
- });
5885
- };
5886
-
5887
5879
  const props$5 = {
5888
5880
  // 视频信息|视频源uuid
5889
5881
  camera: {
@@ -5906,6 +5898,10 @@ const props$5 = {
5906
5898
  baseUrl: {
5907
5899
  type: String,
5908
5900
  default: ""
5901
+ },
5902
+ domId: {
5903
+ type: String,
5904
+ default: ""
5909
5905
  }
5910
5906
  };
5911
5907
  const VideoPlayerV2 = vue.defineComponent({
@@ -5913,7 +5909,7 @@ const VideoPlayerV2 = vue.defineComponent({
5913
5909
  emits: ["changeStream"],
5914
5910
  setup(_prop, _context) {
5915
5911
  let play;
5916
- const uuid = UUID();
5912
+ const uuid = _prop.domId;
5917
5913
  const videoFull = id => {
5918
5914
  const elm = document.getElementById(`videoPlayer_${uuid}`);
5919
5915
  if (elm.requestFullScreen) {
@@ -5923,11 +5919,13 @@ const VideoPlayerV2 = vue.defineComponent({
5923
5919
  } else if (elm.webkitRequestFullScreen) {
5924
5920
  elm.webkitRequestFullScreen();
5925
5921
  }
5926
- setTimeout(() => {
5927
- window.onresize = () => {
5928
- _context.emit("changeStream");
5929
- };
5930
- }, 500);
5922
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
5923
+ setTimeout(() => {
5924
+ window.onresize = () => {
5925
+ _context.emit("changeStream");
5926
+ };
5927
+ }, 500);
5928
+ }
5931
5929
  };
5932
5930
  const videoInfo2 = vue.ref({});
5933
5931
  const stopPlay = () => {
@@ -5994,18 +5992,20 @@ const VideoPlayerV2 = vue.defineComponent({
5994
5992
  token: _prop.token || sessionStorage.getItem("token") || ""
5995
5993
  }
5996
5994
  });
5995
+ const {
5996
+ data
5997
+ } = detailRes;
5998
+ videoInfo2.value = {
5999
+ ...data.data,
6000
+ ..._prop.cameraConfig
6001
+ };
5997
6002
  if (res.status === 200) {
5998
- const {
5999
- data
6000
- } = detailRes;
6001
6003
  if (res.data.data[0]) {
6002
- data.data.webrtcTemplateMerged = res.data.data[0];
6004
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
6003
6005
  releaseUrl.value = res.data.data[1];
6004
- data.data.mediaServerPo.url = res.data.data[2];
6005
- videoInfo2.value = {
6006
- ...data.data,
6007
- ..._prop.cameraConfig
6008
- };
6006
+ if (videoInfo2.value.mediaServerPo) {
6007
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
6008
+ }
6009
6009
  init();
6010
6010
  }
6011
6011
  }
@@ -6034,6 +6034,7 @@ const VideoPlayerV2 = vue.defineComponent({
6034
6034
  "muted": true,
6035
6035
  "autoplay": true
6036
6036
  }, null) : vue.createVNode("video", {
6037
+ "id": `videoPlayer_${uuid}`,
6037
6038
  "class": "videoComponent fill",
6038
6039
  "src": videoInfo2.value.mp4ResourcesPath,
6039
6040
  "autoplay": true,
@@ -6327,6 +6328,14 @@ const VideoBox = vue.defineComponent({
6327
6328
  });
6328
6329
  var videoBox = installComponent(VideoBox, "video-box");
6329
6330
 
6331
+ const UUID = (n = 16) => {
6332
+ return "xxxx-xx-4x-yx-xx".replace(/[xy]/g, c => {
6333
+ const r = Math.random() * 16 | 0,
6334
+ v = c == "x" ? r : r & 3 | 8;
6335
+ return v.toString(n);
6336
+ });
6337
+ };
6338
+
6330
6339
  const props$3 = {
6331
6340
  // 视频信息|视频源uuid
6332
6341
  camera: {
@@ -6393,6 +6402,7 @@ const VideoBoxV2 = vue.defineComponent({
6393
6402
  signal: 28
6394
6403
  }]];
6395
6404
  const infos = vue.ref([]);
6405
+ const uuid = UUID();
6396
6406
  vue.onMounted(() => {
6397
6407
  showInfo.value = _prop.showInfo;
6398
6408
  });
@@ -6439,12 +6449,12 @@ const VideoBoxV2 = vue.defineComponent({
6439
6449
  }
6440
6450
  });
6441
6451
  };
6442
- const getVideoParams = async uuid => {
6452
+ const getVideoParams = async uuid2 => {
6443
6453
  const arr = infos.value.map(info => {
6444
6454
  return {};
6445
6455
  });
6446
6456
  const res = await axios__default["default"].post("/api/vms/v1/cameraRelThing/getByParam", {
6447
- cameraUuid: uuid
6457
+ cameraUuid: uuid2
6448
6458
  }, {
6449
6459
  headers: {
6450
6460
  token: sessionStorage.getItem("token")
@@ -6501,9 +6511,11 @@ const VideoBoxV2 = vue.defineComponent({
6501
6511
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
6502
6512
  };
6503
6513
  return () => vue.createVNode("div", {
6514
+ "id": "videoBox_" + uuid,
6504
6515
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
6505
6516
  }, [vue.createVNode(VideoPlayerV2, {
6506
6517
  "ref": player,
6518
+ "domId": uuid,
6507
6519
  "camera": camera.value,
6508
6520
  "cameraConfig": cameraConfig.value,
6509
6521
  "fill": fill.value,
@@ -6512,7 +6524,7 @@ const VideoBoxV2 = vue.defineComponent({
6512
6524
  streamType: streamHistory.value || camera.value.streamType
6513
6525
  };
6514
6526
  }
6515
- }, null), camera.value.brandTypeCode !== "MP4" && showInfo.value ? vue.createVNode("div", {
6527
+ }, null), showInfo.value ? vue.createVNode("div", {
6516
6528
  "class": "selectFields"
6517
6529
  }, [[0, 1, 2, 3, 4, 5].map(index => {
6518
6530
  let info = {};
@@ -6533,7 +6545,7 @@ const VideoBoxV2 = vue.defineComponent({
6533
6545
  }, [vue.createVNode("span", null, [camera.value?.name])]), vue.createVNode("div", {
6534
6546
  "class": "tool"
6535
6547
  }, [_prop.btns.map(btn => {
6536
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "look")) {
6548
+ if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
6537
6549
  switch (btn) {
6538
6550
  case "fill":
6539
6551
  return vue.createVNode("img", {
@@ -70,7 +70,7 @@ declare const _default$6: vue.DefineComponent<{
70
70
  }, {}>;
71
71
 
72
72
  interface videoInfo$1 {
73
- [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1>;
73
+ [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1> | any;
74
74
  }
75
75
 
76
76
  declare const _default$5: vue.DefineComponent<{
@@ -94,6 +94,10 @@ declare const _default$5: vue.DefineComponent<{
94
94
  type: StringConstructor;
95
95
  default: string;
96
96
  };
97
+ domId: {
98
+ type: StringConstructor;
99
+ default: string;
100
+ };
97
101
  }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "changeStream"[], "changeStream", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
98
102
  camera: {
99
103
  require: boolean;
@@ -115,6 +119,10 @@ declare const _default$5: vue.DefineComponent<{
115
119
  type: StringConstructor;
116
120
  default: string;
117
121
  };
122
+ domId: {
123
+ type: StringConstructor;
124
+ default: string;
125
+ };
118
126
  }>> & {
119
127
  onChangeStream?: ((...args: any[]) => any) | undefined;
120
128
  }, {
@@ -122,6 +130,7 @@ declare const _default$5: vue.DefineComponent<{
122
130
  cameraConfig: Record<string, any>;
123
131
  token: string;
124
132
  baseUrl: string;
133
+ domId: string;
125
134
  }, {}>;
126
135
 
127
136
  interface videoInfo {
@@ -5867,14 +5867,6 @@ class WebRtcMt$1 {
5867
5867
  }
5868
5868
  }
5869
5869
 
5870
- const UUID = (n = 16) => {
5871
- return "xxxx-xx-4x-yx-xx".replace(/[xy]/g, c => {
5872
- const r = Math.random() * 16 | 0,
5873
- v = c == "x" ? r : r & 3 | 8;
5874
- return v.toString(n);
5875
- });
5876
- };
5877
-
5878
5870
  const props$5 = {
5879
5871
  // 视频信息|视频源uuid
5880
5872
  camera: {
@@ -5897,6 +5889,10 @@ const props$5 = {
5897
5889
  baseUrl: {
5898
5890
  type: String,
5899
5891
  default: ""
5892
+ },
5893
+ domId: {
5894
+ type: String,
5895
+ default: ""
5900
5896
  }
5901
5897
  };
5902
5898
  const VideoPlayerV2 = defineComponent({
@@ -5904,7 +5900,7 @@ const VideoPlayerV2 = defineComponent({
5904
5900
  emits: ["changeStream"],
5905
5901
  setup(_prop, _context) {
5906
5902
  let play;
5907
- const uuid = UUID();
5903
+ const uuid = _prop.domId;
5908
5904
  const videoFull = id => {
5909
5905
  const elm = document.getElementById(`videoPlayer_${uuid}`);
5910
5906
  if (elm.requestFullScreen) {
@@ -5914,11 +5910,13 @@ const VideoPlayerV2 = defineComponent({
5914
5910
  } else if (elm.webkitRequestFullScreen) {
5915
5911
  elm.webkitRequestFullScreen();
5916
5912
  }
5917
- setTimeout(() => {
5918
- window.onresize = () => {
5919
- _context.emit("changeStream");
5920
- };
5921
- }, 500);
5913
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
5914
+ setTimeout(() => {
5915
+ window.onresize = () => {
5916
+ _context.emit("changeStream");
5917
+ };
5918
+ }, 500);
5919
+ }
5922
5920
  };
5923
5921
  const videoInfo2 = ref({});
5924
5922
  const stopPlay = () => {
@@ -5985,18 +5983,20 @@ const VideoPlayerV2 = defineComponent({
5985
5983
  token: _prop.token || sessionStorage.getItem("token") || ""
5986
5984
  }
5987
5985
  });
5986
+ const {
5987
+ data
5988
+ } = detailRes;
5989
+ videoInfo2.value = {
5990
+ ...data.data,
5991
+ ..._prop.cameraConfig
5992
+ };
5988
5993
  if (res.status === 200) {
5989
- const {
5990
- data
5991
- } = detailRes;
5992
5994
  if (res.data.data[0]) {
5993
- data.data.webrtcTemplateMerged = res.data.data[0];
5995
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
5994
5996
  releaseUrl.value = res.data.data[1];
5995
- data.data.mediaServerPo.url = res.data.data[2];
5996
- videoInfo2.value = {
5997
- ...data.data,
5998
- ..._prop.cameraConfig
5999
- };
5997
+ if (videoInfo2.value.mediaServerPo) {
5998
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
5999
+ }
6000
6000
  init();
6001
6001
  }
6002
6002
  }
@@ -6025,6 +6025,7 @@ const VideoPlayerV2 = defineComponent({
6025
6025
  "muted": true,
6026
6026
  "autoplay": true
6027
6027
  }, null) : createVNode("video", {
6028
+ "id": `videoPlayer_${uuid}`,
6028
6029
  "class": "videoComponent fill",
6029
6030
  "src": videoInfo2.value.mp4ResourcesPath,
6030
6031
  "autoplay": true,
@@ -6318,6 +6319,14 @@ const VideoBox = defineComponent({
6318
6319
  });
6319
6320
  var videoBox = installComponent(VideoBox, "video-box");
6320
6321
 
6322
+ const UUID = (n = 16) => {
6323
+ return "xxxx-xx-4x-yx-xx".replace(/[xy]/g, c => {
6324
+ const r = Math.random() * 16 | 0,
6325
+ v = c == "x" ? r : r & 3 | 8;
6326
+ return v.toString(n);
6327
+ });
6328
+ };
6329
+
6321
6330
  const props$3 = {
6322
6331
  // 视频信息|视频源uuid
6323
6332
  camera: {
@@ -6384,6 +6393,7 @@ const VideoBoxV2 = defineComponent({
6384
6393
  signal: 28
6385
6394
  }]];
6386
6395
  const infos = ref([]);
6396
+ const uuid = UUID();
6387
6397
  onMounted(() => {
6388
6398
  showInfo.value = _prop.showInfo;
6389
6399
  });
@@ -6430,12 +6440,12 @@ const VideoBoxV2 = defineComponent({
6430
6440
  }
6431
6441
  });
6432
6442
  };
6433
- const getVideoParams = async uuid => {
6443
+ const getVideoParams = async uuid2 => {
6434
6444
  const arr = infos.value.map(info => {
6435
6445
  return {};
6436
6446
  });
6437
6447
  const res = await axios$2.post("/api/vms/v1/cameraRelThing/getByParam", {
6438
- cameraUuid: uuid
6448
+ cameraUuid: uuid2
6439
6449
  }, {
6440
6450
  headers: {
6441
6451
  token: sessionStorage.getItem("token")
@@ -6492,9 +6502,11 @@ const VideoBoxV2 = defineComponent({
6492
6502
  cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
6493
6503
  };
6494
6504
  return () => createVNode("div", {
6505
+ "id": "videoBox_" + uuid,
6495
6506
  "class": ["videoBox", _prop.alarm ? "alarm" : ""]
6496
6507
  }, [createVNode(VideoPlayerV2, {
6497
6508
  "ref": player,
6509
+ "domId": uuid,
6498
6510
  "camera": camera.value,
6499
6511
  "cameraConfig": cameraConfig.value,
6500
6512
  "fill": fill.value,
@@ -6503,7 +6515,7 @@ const VideoBoxV2 = defineComponent({
6503
6515
  streamType: streamHistory.value || camera.value.streamType
6504
6516
  };
6505
6517
  }
6506
- }, null), camera.value.brandTypeCode !== "MP4" && showInfo.value ? createVNode("div", {
6518
+ }, null), showInfo.value ? createVNode("div", {
6507
6519
  "class": "selectFields"
6508
6520
  }, [[0, 1, 2, 3, 4, 5].map(index => {
6509
6521
  let info = {};
@@ -6524,7 +6536,7 @@ const VideoBoxV2 = defineComponent({
6524
6536
  }, [createVNode("span", null, [camera.value?.name])]), createVNode("div", {
6525
6537
  "class": "tool"
6526
6538
  }, [_prop.btns.map(btn => {
6527
- if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "look")) {
6539
+ if (!(camera.value.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
6528
6540
  switch (btn) {
6529
6541
  case "fill":
6530
6542
  return createVNode("img", {
@@ -5872,14 +5872,6 @@ function installComponent(component, name, withPrefix = true) {
5872
5872
  return component;
5873
5873
  }
5874
5874
 
5875
- const UUID = (n = 16) => {
5876
- return "xxxx-xx-4x-yx-xx".replace(/[xy]/g, c => {
5877
- const r = Math.random() * 16 | 0,
5878
- v = c == "x" ? r : r & 3 | 8;
5879
- return v.toString(n);
5880
- });
5881
- };
5882
-
5883
5875
  const props = {
5884
5876
  // 视频信息|视频源uuid
5885
5877
  camera: {
@@ -5902,6 +5894,10 @@ const props = {
5902
5894
  baseUrl: {
5903
5895
  type: String,
5904
5896
  default: ""
5897
+ },
5898
+ domId: {
5899
+ type: String,
5900
+ default: ""
5905
5901
  }
5906
5902
  };
5907
5903
  const VideoPlayerV2 = vue.defineComponent({
@@ -5909,7 +5905,7 @@ const VideoPlayerV2 = vue.defineComponent({
5909
5905
  emits: ["changeStream"],
5910
5906
  setup(_prop, _context) {
5911
5907
  let play;
5912
- const uuid = UUID();
5908
+ const uuid = _prop.domId;
5913
5909
  const videoFull = id => {
5914
5910
  const elm = document.getElementById(`videoPlayer_${uuid}`);
5915
5911
  if (elm.requestFullScreen) {
@@ -5919,11 +5915,13 @@ const VideoPlayerV2 = vue.defineComponent({
5919
5915
  } else if (elm.webkitRequestFullScreen) {
5920
5916
  elm.webkitRequestFullScreen();
5921
5917
  }
5922
- setTimeout(() => {
5923
- window.onresize = () => {
5924
- _context.emit("changeStream");
5925
- };
5926
- }, 500);
5918
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
5919
+ setTimeout(() => {
5920
+ window.onresize = () => {
5921
+ _context.emit("changeStream");
5922
+ };
5923
+ }, 500);
5924
+ }
5927
5925
  };
5928
5926
  const videoInfo2 = vue.ref({});
5929
5927
  const stopPlay = () => {
@@ -5990,18 +5988,20 @@ const VideoPlayerV2 = vue.defineComponent({
5990
5988
  token: _prop.token || sessionStorage.getItem("token") || ""
5991
5989
  }
5992
5990
  });
5991
+ const {
5992
+ data
5993
+ } = detailRes;
5994
+ videoInfo2.value = {
5995
+ ...data.data,
5996
+ ..._prop.cameraConfig
5997
+ };
5993
5998
  if (res.status === 200) {
5994
- const {
5995
- data
5996
- } = detailRes;
5997
5999
  if (res.data.data[0]) {
5998
- data.data.webrtcTemplateMerged = res.data.data[0];
6000
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
5999
6001
  releaseUrl.value = res.data.data[1];
6000
- data.data.mediaServerPo.url = res.data.data[2];
6001
- videoInfo2.value = {
6002
- ...data.data,
6003
- ..._prop.cameraConfig
6004
- };
6002
+ if (videoInfo2.value.mediaServerPo) {
6003
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
6004
+ }
6005
6005
  init();
6006
6006
  }
6007
6007
  }
@@ -6030,6 +6030,7 @@ const VideoPlayerV2 = vue.defineComponent({
6030
6030
  "muted": true,
6031
6031
  "autoplay": true
6032
6032
  }, null) : vue.createVNode("video", {
6033
+ "id": `videoPlayer_${uuid}`,
6033
6034
  "class": "videoComponent fill",
6034
6035
  "src": videoInfo2.value.mp4ResourcesPath,
6035
6036
  "autoplay": true,
@@ -3,7 +3,7 @@ import { PropType } from 'vue';
3
3
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
4
4
 
5
5
  interface videoInfo {
6
- [key: string]: string | number | boolean | videoInfo | Array<videoInfo>;
6
+ [key: string]: string | number | boolean | videoInfo | Array<videoInfo> | any;
7
7
  }
8
8
 
9
9
  declare const _default: vue.DefineComponent<{
@@ -27,6 +27,10 @@ declare const _default: vue.DefineComponent<{
27
27
  type: StringConstructor;
28
28
  default: string;
29
29
  };
30
+ domId: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
30
34
  }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "changeStream"[], "changeStream", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
31
35
  camera: {
32
36
  require: boolean;
@@ -48,6 +52,10 @@ declare const _default: vue.DefineComponent<{
48
52
  type: StringConstructor;
49
53
  default: string;
50
54
  };
55
+ domId: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
51
59
  }>> & {
52
60
  onChangeStream?: ((...args: any[]) => any) | undefined;
53
61
  }, {
@@ -55,6 +63,7 @@ declare const _default: vue.DefineComponent<{
55
63
  cameraConfig: Record<string, any>;
56
64
  token: string;
57
65
  baseUrl: string;
66
+ domId: string;
58
67
  }, {}>;
59
68
 
60
69
  export { _default as VideoPlayerV2 };
@@ -5864,14 +5864,6 @@ function installComponent(component, name, withPrefix = true) {
5864
5864
  return component;
5865
5865
  }
5866
5866
 
5867
- const UUID = (n = 16) => {
5868
- return "xxxx-xx-4x-yx-xx".replace(/[xy]/g, c => {
5869
- const r = Math.random() * 16 | 0,
5870
- v = c == "x" ? r : r & 3 | 8;
5871
- return v.toString(n);
5872
- });
5873
- };
5874
-
5875
5867
  const props = {
5876
5868
  // 视频信息|视频源uuid
5877
5869
  camera: {
@@ -5894,6 +5886,10 @@ const props = {
5894
5886
  baseUrl: {
5895
5887
  type: String,
5896
5888
  default: ""
5889
+ },
5890
+ domId: {
5891
+ type: String,
5892
+ default: ""
5897
5893
  }
5898
5894
  };
5899
5895
  const VideoPlayerV2 = defineComponent({
@@ -5901,7 +5897,7 @@ const VideoPlayerV2 = defineComponent({
5901
5897
  emits: ["changeStream"],
5902
5898
  setup(_prop, _context) {
5903
5899
  let play;
5904
- const uuid = UUID();
5900
+ const uuid = _prop.domId;
5905
5901
  const videoFull = id => {
5906
5902
  const elm = document.getElementById(`videoPlayer_${uuid}`);
5907
5903
  if (elm.requestFullScreen) {
@@ -5911,11 +5907,13 @@ const VideoPlayerV2 = defineComponent({
5911
5907
  } else if (elm.webkitRequestFullScreen) {
5912
5908
  elm.webkitRequestFullScreen();
5913
5909
  }
5914
- setTimeout(() => {
5915
- window.onresize = () => {
5916
- _context.emit("changeStream");
5917
- };
5918
- }, 500);
5910
+ if (videoInfo2.value.brandTypeCode !== "MP4") {
5911
+ setTimeout(() => {
5912
+ window.onresize = () => {
5913
+ _context.emit("changeStream");
5914
+ };
5915
+ }, 500);
5916
+ }
5919
5917
  };
5920
5918
  const videoInfo2 = ref({});
5921
5919
  const stopPlay = () => {
@@ -5982,18 +5980,20 @@ const VideoPlayerV2 = defineComponent({
5982
5980
  token: _prop.token || sessionStorage.getItem("token") || ""
5983
5981
  }
5984
5982
  });
5983
+ const {
5984
+ data
5985
+ } = detailRes;
5986
+ videoInfo2.value = {
5987
+ ...data.data,
5988
+ ..._prop.cameraConfig
5989
+ };
5985
5990
  if (res.status === 200) {
5986
- const {
5987
- data
5988
- } = detailRes;
5989
5991
  if (res.data.data[0]) {
5990
- data.data.webrtcTemplateMerged = res.data.data[0];
5992
+ videoInfo2.value.webrtcTemplateMerged = res.data.data[0];
5991
5993
  releaseUrl.value = res.data.data[1];
5992
- data.data.mediaServerPo.url = res.data.data[2];
5993
- videoInfo2.value = {
5994
- ...data.data,
5995
- ..._prop.cameraConfig
5996
- };
5994
+ if (videoInfo2.value.mediaServerPo) {
5995
+ videoInfo2.value.mediaServerPo.url = res.data.data[2];
5996
+ }
5997
5997
  init();
5998
5998
  }
5999
5999
  }
@@ -6022,6 +6022,7 @@ const VideoPlayerV2 = defineComponent({
6022
6022
  "muted": true,
6023
6023
  "autoplay": true
6024
6024
  }, null) : createVNode("video", {
6025
+ "id": `videoPlayer_${uuid}`,
6025
6026
  "class": "videoComponent fill",
6026
6027
  "src": videoInfo2.value.mp4ResourcesPath,
6027
6028
  "autoplay": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",