mtxt-ui3 0.0.32 → 0.0.34

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.
@@ -6497,6 +6497,7 @@ const Endpoint = RTCEndpoint;
6497
6497
  class WebRtcMt$1 {
6498
6498
  constructor(opt) {
6499
6499
  this.opt = opt;
6500
+ this.p_player = vue.ref(null);
6500
6501
  this.init(opt);
6501
6502
  }
6502
6503
  opt;
@@ -6536,7 +6537,7 @@ class WebRtcMt$1 {
6536
6537
  if (opt.h) this.config.h = opt.h;
6537
6538
  if (opt.w) this.config.w = opt.w;
6538
6539
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
6539
- this.p_player = this.createVideo(opt.plays);
6540
+ this.p_player.value = this.createVideo(opt.plays);
6540
6541
  } else {
6541
6542
  for (const i of opt.plays) {
6542
6543
  this.createVideo(i);
@@ -6560,9 +6561,6 @@ class WebRtcMt$1 {
6560
6561
  resolve(res);
6561
6562
  } else {
6562
6563
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6563
- setTimeout(() => {
6564
- this.rePlay();
6565
- }, 10 * 1e3);
6566
6564
  reject(false);
6567
6565
  }
6568
6566
  });
@@ -6635,8 +6633,9 @@ class WebRtcMt$1 {
6635
6633
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6636
6634
  this.stopPlay();
6637
6635
  setTimeout(() => {
6638
- console.log("\u5E95\u90E8\u91CD\u64AD");
6639
- this.p_player = false;
6636
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
6637
+ this.p_player.value = false;
6638
+ console.info("v2---", this.p_player.value);
6640
6639
  }, 5 * 1e3);
6641
6640
  }
6642
6641
  // 播放
@@ -6709,7 +6708,7 @@ const VideoPlayerV2 = vue.defineComponent({
6709
6708
  props: props$7,
6710
6709
  emits: ["changeStream"],
6711
6710
  setup(_prop, _context) {
6712
- const play = vue.ref(null);
6711
+ let play = vue.reactive(null);
6713
6712
  const uuid = _prop.domId;
6714
6713
  const videoFull = id => {
6715
6714
  const elm = document.getElementById(`videoPlayer_${uuid}`);
@@ -6730,19 +6729,19 @@ const VideoPlayerV2 = vue.defineComponent({
6730
6729
  };
6731
6730
  const videoInfo2 = vue.ref({});
6732
6731
  const stopPlay = () => {
6733
- if (play.value) {
6734
- play.value.stopPlay(`videoPlayer_${uuid}`);
6732
+ if (play) {
6733
+ play.stopPlay(`videoPlayer_${uuid}`);
6735
6734
  }
6736
6735
  };
6737
6736
  const init = () => {
6738
- play.value = null;
6737
+ play = null;
6739
6738
  let camera = videoInfo2.value;
6740
6739
  camera = {
6741
6740
  ...camera,
6742
6741
  ..._prop.cameraConfig
6743
6742
  };
6744
6743
  let url = camera.webrtcTemplateMerged;
6745
- play.value = new WebRtcMt$1({
6744
+ play = vue.reactive(new WebRtcMt$1({
6746
6745
  plays: {
6747
6746
  videoElm: `videoPlayer_${uuid}`,
6748
6747
  mediaServerAddr: camera.mediaServerPo.url,
@@ -6754,7 +6753,7 @@ const VideoPlayerV2 = vue.defineComponent({
6754
6753
  cameraStream: camera.streamType,
6755
6754
  addRtspProxyUrl: url
6756
6755
  }
6757
- });
6756
+ }));
6758
6757
  };
6759
6758
  const releaseUrl = vue.ref("");
6760
6759
  const release = async () => {
@@ -6810,7 +6809,7 @@ const VideoPlayerV2 = vue.defineComponent({
6810
6809
  immediate: true,
6811
6810
  deep: true
6812
6811
  });
6813
- vue.watch(() => play.value?.p_player, nval => {
6812
+ vue.watch(() => play?.p_player, nval => {
6814
6813
  if (nval) {
6815
6814
  console.info("p_player ===> ", nval);
6816
6815
  } else {
@@ -6487,6 +6487,7 @@ const Endpoint = RTCEndpoint;
6487
6487
  class WebRtcMt$1 {
6488
6488
  constructor(opt) {
6489
6489
  this.opt = opt;
6490
+ this.p_player = ref(null);
6490
6491
  this.init(opt);
6491
6492
  }
6492
6493
  opt;
@@ -6526,7 +6527,7 @@ class WebRtcMt$1 {
6526
6527
  if (opt.h) this.config.h = opt.h;
6527
6528
  if (opt.w) this.config.w = opt.w;
6528
6529
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
6529
- this.p_player = this.createVideo(opt.plays);
6530
+ this.p_player.value = this.createVideo(opt.plays);
6530
6531
  } else {
6531
6532
  for (const i of opt.plays) {
6532
6533
  this.createVideo(i);
@@ -6550,9 +6551,6 @@ class WebRtcMt$1 {
6550
6551
  resolve(res);
6551
6552
  } else {
6552
6553
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6553
- setTimeout(() => {
6554
- this.rePlay();
6555
- }, 10 * 1e3);
6556
6554
  reject(false);
6557
6555
  }
6558
6556
  });
@@ -6625,8 +6623,9 @@ class WebRtcMt$1 {
6625
6623
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6626
6624
  this.stopPlay();
6627
6625
  setTimeout(() => {
6628
- console.log("\u5E95\u90E8\u91CD\u64AD");
6629
- this.p_player = false;
6626
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
6627
+ this.p_player.value = false;
6628
+ console.info("v2---", this.p_player.value);
6630
6629
  }, 5 * 1e3);
6631
6630
  }
6632
6631
  // 播放
@@ -6699,7 +6698,7 @@ const VideoPlayerV2 = defineComponent({
6699
6698
  props: props$7,
6700
6699
  emits: ["changeStream"],
6701
6700
  setup(_prop, _context) {
6702
- const play = ref(null);
6701
+ let play = reactive(null);
6703
6702
  const uuid = _prop.domId;
6704
6703
  const videoFull = id => {
6705
6704
  const elm = document.getElementById(`videoPlayer_${uuid}`);
@@ -6720,19 +6719,19 @@ const VideoPlayerV2 = defineComponent({
6720
6719
  };
6721
6720
  const videoInfo2 = ref({});
6722
6721
  const stopPlay = () => {
6723
- if (play.value) {
6724
- play.value.stopPlay(`videoPlayer_${uuid}`);
6722
+ if (play) {
6723
+ play.stopPlay(`videoPlayer_${uuid}`);
6725
6724
  }
6726
6725
  };
6727
6726
  const init = () => {
6728
- play.value = null;
6727
+ play = null;
6729
6728
  let camera = videoInfo2.value;
6730
6729
  camera = {
6731
6730
  ...camera,
6732
6731
  ..._prop.cameraConfig
6733
6732
  };
6734
6733
  let url = camera.webrtcTemplateMerged;
6735
- play.value = new WebRtcMt$1({
6734
+ play = reactive(new WebRtcMt$1({
6736
6735
  plays: {
6737
6736
  videoElm: `videoPlayer_${uuid}`,
6738
6737
  mediaServerAddr: camera.mediaServerPo.url,
@@ -6744,7 +6743,7 @@ const VideoPlayerV2 = defineComponent({
6744
6743
  cameraStream: camera.streamType,
6745
6744
  addRtspProxyUrl: url
6746
6745
  }
6747
- });
6746
+ }));
6748
6747
  };
6749
6748
  const releaseUrl = ref("");
6750
6749
  const release = async () => {
@@ -6800,7 +6799,7 @@ const VideoPlayerV2 = defineComponent({
6800
6799
  immediate: true,
6801
6800
  deep: true
6802
6801
  });
6803
- watch(() => play.value?.p_player, nval => {
6802
+ watch(() => play?.p_player, nval => {
6804
6803
  if (nval) {
6805
6804
  console.info("p_player ===> ", nval);
6806
6805
  } else {
@@ -5907,6 +5907,7 @@ const playOneWebRtcMt = async (uuid, domId, dom, token) => {
5907
5907
  class WebRtcMt {
5908
5908
  constructor(opt) {
5909
5909
  this.opt = opt;
5910
+ this.p_player = vue.ref(null);
5910
5911
  this.init(opt);
5911
5912
  }
5912
5913
  opt;
@@ -5946,7 +5947,7 @@ class WebRtcMt {
5946
5947
  if (opt.h) this.config.h = opt.h;
5947
5948
  if (opt.w) this.config.w = opt.w;
5948
5949
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
5949
- this.p_player = this.createVideo(opt.plays);
5950
+ this.p_player.value = this.createVideo(opt.plays);
5950
5951
  } else {
5951
5952
  for (const i of opt.plays) {
5952
5953
  this.createVideo(i);
@@ -5970,9 +5971,6 @@ class WebRtcMt {
5970
5971
  resolve(res);
5971
5972
  } else {
5972
5973
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5973
- setTimeout(() => {
5974
- this.rePlay();
5975
- }, 10 * 1e3);
5976
5974
  reject(false);
5977
5975
  }
5978
5976
  });
@@ -6045,8 +6043,9 @@ class WebRtcMt {
6045
6043
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6046
6044
  this.stopPlay();
6047
6045
  setTimeout(() => {
6048
- console.log("\u5E95\u90E8\u91CD\u64AD");
6049
- this.p_player = false;
6046
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
6047
+ this.p_player.value = false;
6048
+ console.info("v2---", this.p_player.value);
6050
6049
  }, 5 * 1e3);
6051
6050
  }
6052
6051
  // 播放
@@ -5898,6 +5898,7 @@ const playOneWebRtcMt = async (uuid, domId, dom, token) => {
5898
5898
  class WebRtcMt {
5899
5899
  constructor(opt) {
5900
5900
  this.opt = opt;
5901
+ this.p_player = ref(null);
5901
5902
  this.init(opt);
5902
5903
  }
5903
5904
  opt;
@@ -5937,7 +5938,7 @@ class WebRtcMt {
5937
5938
  if (opt.h) this.config.h = opt.h;
5938
5939
  if (opt.w) this.config.w = opt.w;
5939
5940
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
5940
- this.p_player = this.createVideo(opt.plays);
5941
+ this.p_player.value = this.createVideo(opt.plays);
5941
5942
  } else {
5942
5943
  for (const i of opt.plays) {
5943
5944
  this.createVideo(i);
@@ -5961,9 +5962,6 @@ class WebRtcMt {
5961
5962
  resolve(res);
5962
5963
  } else {
5963
5964
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5964
- setTimeout(() => {
5965
- this.rePlay();
5966
- }, 10 * 1e3);
5967
5965
  reject(false);
5968
5966
  }
5969
5967
  });
@@ -6036,8 +6034,9 @@ class WebRtcMt {
6036
6034
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6037
6035
  this.stopPlay();
6038
6036
  setTimeout(() => {
6039
- console.log("\u5E95\u90E8\u91CD\u64AD");
6040
- this.p_player = false;
6037
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
6038
+ this.p_player.value = false;
6039
+ console.info("v2---", this.p_player.value);
6041
6040
  }, 5 * 1e3);
6042
6041
  }
6043
6042
  // 播放
package/dist/index.cjs CHANGED
@@ -21,7 +21,7 @@ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
21
21
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
22
22
  var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
23
23
 
24
- var version = "0.0.31";
24
+ var version = "0.0.33";
25
25
 
26
26
  const setRem = opt => {
27
27
  const fontSize = opt.fontSize || 14;
@@ -6513,6 +6513,7 @@ const playOneWebRtcMt = async (uuid, domId, dom, token) => {
6513
6513
  class WebRtcMt$1 {
6514
6514
  constructor(opt) {
6515
6515
  this.opt = opt;
6516
+ this.p_player = vue.ref(null);
6516
6517
  this.init(opt);
6517
6518
  }
6518
6519
  opt;
@@ -6552,7 +6553,7 @@ class WebRtcMt$1 {
6552
6553
  if (opt.h) this.config.h = opt.h;
6553
6554
  if (opt.w) this.config.w = opt.w;
6554
6555
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
6555
- this.p_player = this.createVideo(opt.plays);
6556
+ this.p_player.value = this.createVideo(opt.plays);
6556
6557
  } else {
6557
6558
  for (const i of opt.plays) {
6558
6559
  this.createVideo(i);
@@ -6576,9 +6577,6 @@ class WebRtcMt$1 {
6576
6577
  resolve(res);
6577
6578
  } else {
6578
6579
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6579
- setTimeout(() => {
6580
- this.rePlay();
6581
- }, 10 * 1e3);
6582
6580
  reject(false);
6583
6581
  }
6584
6582
  });
@@ -6651,8 +6649,9 @@ class WebRtcMt$1 {
6651
6649
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6652
6650
  this.stopPlay();
6653
6651
  setTimeout(() => {
6654
- console.log("\u5E95\u90E8\u91CD\u64AD");
6655
- this.p_player = false;
6652
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
6653
+ this.p_player.value = false;
6654
+ console.info("v2---", this.p_player.value);
6656
6655
  }, 5 * 1e3);
6657
6656
  }
6658
6657
  // 播放
@@ -7240,7 +7239,7 @@ const VideoPlayerV2 = vue.defineComponent({
7240
7239
  props: props$7,
7241
7240
  emits: ["changeStream"],
7242
7241
  setup(_prop, _context) {
7243
- const play = vue.ref(null);
7242
+ let play = vue.reactive(null);
7244
7243
  const uuid = _prop.domId;
7245
7244
  const videoFull = id => {
7246
7245
  const elm = document.getElementById(`videoPlayer_${uuid}`);
@@ -7261,19 +7260,19 @@ const VideoPlayerV2 = vue.defineComponent({
7261
7260
  };
7262
7261
  const videoInfo2 = vue.ref({});
7263
7262
  const stopPlay = () => {
7264
- if (play.value) {
7265
- play.value.stopPlay(`videoPlayer_${uuid}`);
7263
+ if (play) {
7264
+ play.stopPlay(`videoPlayer_${uuid}`);
7266
7265
  }
7267
7266
  };
7268
7267
  const init = () => {
7269
- play.value = null;
7268
+ play = null;
7270
7269
  let camera = videoInfo2.value;
7271
7270
  camera = {
7272
7271
  ...camera,
7273
7272
  ..._prop.cameraConfig
7274
7273
  };
7275
7274
  let url = camera.webrtcTemplateMerged;
7276
- play.value = new WebRtcMt$1({
7275
+ play = vue.reactive(new WebRtcMt$1({
7277
7276
  plays: {
7278
7277
  videoElm: `videoPlayer_${uuid}`,
7279
7278
  mediaServerAddr: camera.mediaServerPo.url,
@@ -7285,7 +7284,7 @@ const VideoPlayerV2 = vue.defineComponent({
7285
7284
  cameraStream: camera.streamType,
7286
7285
  addRtspProxyUrl: url
7287
7286
  }
7288
- });
7287
+ }));
7289
7288
  };
7290
7289
  const releaseUrl = vue.ref("");
7291
7290
  const release = async () => {
@@ -7341,7 +7340,7 @@ const VideoPlayerV2 = vue.defineComponent({
7341
7340
  immediate: true,
7342
7341
  deep: true
7343
7342
  });
7344
- vue.watch(() => play.value?.p_player, nval => {
7343
+ vue.watch(() => play?.p_player, nval => {
7345
7344
  if (nval) {
7346
7345
  console.info("p_player ===> ", nval);
7347
7346
  } else {
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { MaybeRef, MaybeComputedRef } from '@vueuse/core';
7
7
  import { Key } from 'ant-design-vue/lib/table/interface';
8
8
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
9
9
 
10
- var version = "0.0.31";
10
+ var version = "0.0.33";
11
11
 
12
12
  /**
13
13
  *
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { SearchOutlined, CaretUpOutlined, CaretRightOutlined, CaretDownOutlined,
9
9
  import 'ant-design-vue/dist/antd.less';
10
10
  import zhCN from 'dayjs/locale/zh-cn';
11
11
 
12
- var version = "0.0.31";
12
+ var version = "0.0.33";
13
13
 
14
14
  const setRem = opt => {
15
15
  const fontSize = opt.fontSize || 14;
@@ -6501,6 +6501,7 @@ const playOneWebRtcMt = async (uuid, domId, dom, token) => {
6501
6501
  class WebRtcMt$1 {
6502
6502
  constructor(opt) {
6503
6503
  this.opt = opt;
6504
+ this.p_player = ref(null);
6504
6505
  this.init(opt);
6505
6506
  }
6506
6507
  opt;
@@ -6540,7 +6541,7 @@ class WebRtcMt$1 {
6540
6541
  if (opt.h) this.config.h = opt.h;
6541
6542
  if (opt.w) this.config.w = opt.w;
6542
6543
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
6543
- this.p_player = this.createVideo(opt.plays);
6544
+ this.p_player.value = this.createVideo(opt.plays);
6544
6545
  } else {
6545
6546
  for (const i of opt.plays) {
6546
6547
  this.createVideo(i);
@@ -6564,9 +6565,6 @@ class WebRtcMt$1 {
6564
6565
  resolve(res);
6565
6566
  } else {
6566
6567
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6567
- setTimeout(() => {
6568
- this.rePlay();
6569
- }, 10 * 1e3);
6570
6568
  reject(false);
6571
6569
  }
6572
6570
  });
@@ -6639,8 +6637,9 @@ class WebRtcMt$1 {
6639
6637
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6640
6638
  this.stopPlay();
6641
6639
  setTimeout(() => {
6642
- console.log("\u5E95\u90E8\u91CD\u64AD");
6643
- this.p_player = false;
6640
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
6641
+ this.p_player.value = false;
6642
+ console.info("v2---", this.p_player.value);
6644
6643
  }, 5 * 1e3);
6645
6644
  }
6646
6645
  // 播放
@@ -7228,7 +7227,7 @@ const VideoPlayerV2 = defineComponent({
7228
7227
  props: props$7,
7229
7228
  emits: ["changeStream"],
7230
7229
  setup(_prop, _context) {
7231
- const play = ref(null);
7230
+ let play = reactive(null);
7232
7231
  const uuid = _prop.domId;
7233
7232
  const videoFull = id => {
7234
7233
  const elm = document.getElementById(`videoPlayer_${uuid}`);
@@ -7249,19 +7248,19 @@ const VideoPlayerV2 = defineComponent({
7249
7248
  };
7250
7249
  const videoInfo2 = ref({});
7251
7250
  const stopPlay = () => {
7252
- if (play.value) {
7253
- play.value.stopPlay(`videoPlayer_${uuid}`);
7251
+ if (play) {
7252
+ play.stopPlay(`videoPlayer_${uuid}`);
7254
7253
  }
7255
7254
  };
7256
7255
  const init = () => {
7257
- play.value = null;
7256
+ play = null;
7258
7257
  let camera = videoInfo2.value;
7259
7258
  camera = {
7260
7259
  ...camera,
7261
7260
  ..._prop.cameraConfig
7262
7261
  };
7263
7262
  let url = camera.webrtcTemplateMerged;
7264
- play.value = new WebRtcMt$1({
7263
+ play = reactive(new WebRtcMt$1({
7265
7264
  plays: {
7266
7265
  videoElm: `videoPlayer_${uuid}`,
7267
7266
  mediaServerAddr: camera.mediaServerPo.url,
@@ -7273,7 +7272,7 @@ const VideoPlayerV2 = defineComponent({
7273
7272
  cameraStream: camera.streamType,
7274
7273
  addRtspProxyUrl: url
7275
7274
  }
7276
- });
7275
+ }));
7277
7276
  };
7278
7277
  const releaseUrl = ref("");
7279
7278
  const release = async () => {
@@ -7329,7 +7328,7 @@ const VideoPlayerV2 = defineComponent({
7329
7328
  immediate: true,
7330
7329
  deep: true
7331
7330
  });
7332
- watch(() => play.value?.p_player, nval => {
7331
+ watch(() => play?.p_player, nval => {
7333
7332
  if (nval) {
7334
7333
  console.info("p_player ===> ", nval);
7335
7334
  } else {
@@ -5722,6 +5722,7 @@ const Endpoint = RTCEndpoint;
5722
5722
  class WebRtcMt$1 {
5723
5723
  constructor(opt) {
5724
5724
  this.opt = opt;
5725
+ this.p_player = vue.ref(null);
5725
5726
  this.init(opt);
5726
5727
  }
5727
5728
  opt;
@@ -5761,7 +5762,7 @@ class WebRtcMt$1 {
5761
5762
  if (opt.h) this.config.h = opt.h;
5762
5763
  if (opt.w) this.config.w = opt.w;
5763
5764
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
5764
- this.p_player = this.createVideo(opt.plays);
5765
+ this.p_player.value = this.createVideo(opt.plays);
5765
5766
  } else {
5766
5767
  for (const i of opt.plays) {
5767
5768
  this.createVideo(i);
@@ -5785,9 +5786,6 @@ class WebRtcMt$1 {
5785
5786
  resolve(res);
5786
5787
  } else {
5787
5788
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5788
- setTimeout(() => {
5789
- this.rePlay();
5790
- }, 10 * 1e3);
5791
5789
  reject(false);
5792
5790
  }
5793
5791
  });
@@ -5860,8 +5858,9 @@ class WebRtcMt$1 {
5860
5858
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
5861
5859
  this.stopPlay();
5862
5860
  setTimeout(() => {
5863
- console.log("\u5E95\u90E8\u91CD\u64AD");
5864
- this.p_player = false;
5861
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
5862
+ this.p_player.value = false;
5863
+ console.info("v2---", this.p_player.value);
5865
5864
  }, 5 * 1e3);
5866
5865
  }
5867
5866
  // 播放
@@ -5951,7 +5950,7 @@ const VideoPlayerV2 = vue.defineComponent({
5951
5950
  props: props$1,
5952
5951
  emits: ["changeStream"],
5953
5952
  setup(_prop, _context) {
5954
- const play = vue.ref(null);
5953
+ let play = vue.reactive(null);
5955
5954
  const uuid = _prop.domId;
5956
5955
  const videoFull = id => {
5957
5956
  const elm = document.getElementById(`videoPlayer_${uuid}`);
@@ -5972,19 +5971,19 @@ const VideoPlayerV2 = vue.defineComponent({
5972
5971
  };
5973
5972
  const videoInfo2 = vue.ref({});
5974
5973
  const stopPlay = () => {
5975
- if (play.value) {
5976
- play.value.stopPlay(`videoPlayer_${uuid}`);
5974
+ if (play) {
5975
+ play.stopPlay(`videoPlayer_${uuid}`);
5977
5976
  }
5978
5977
  };
5979
5978
  const init = () => {
5980
- play.value = null;
5979
+ play = null;
5981
5980
  let camera = videoInfo2.value;
5982
5981
  camera = {
5983
5982
  ...camera,
5984
5983
  ..._prop.cameraConfig
5985
5984
  };
5986
5985
  let url = camera.webrtcTemplateMerged;
5987
- play.value = new WebRtcMt$1({
5986
+ play = vue.reactive(new WebRtcMt$1({
5988
5987
  plays: {
5989
5988
  videoElm: `videoPlayer_${uuid}`,
5990
5989
  mediaServerAddr: camera.mediaServerPo.url,
@@ -5996,7 +5995,7 @@ const VideoPlayerV2 = vue.defineComponent({
5996
5995
  cameraStream: camera.streamType,
5997
5996
  addRtspProxyUrl: url
5998
5997
  }
5999
- });
5998
+ }));
6000
5999
  };
6001
6000
  const releaseUrl = vue.ref("");
6002
6001
  const release = async () => {
@@ -6052,7 +6051,7 @@ const VideoPlayerV2 = vue.defineComponent({
6052
6051
  immediate: true,
6053
6052
  deep: true
6054
6053
  });
6055
- vue.watch(() => play.value?.p_player, nval => {
6054
+ vue.watch(() => play?.p_player, nval => {
6056
6055
  if (nval) {
6057
6056
  console.info("p_player ===> ", nval);
6058
6057
  } else {
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, onBeforeUnmount, createVNode, Fragment } from 'vue';
1
+ import { ref, defineComponent, reactive, watch, onBeforeUnmount, createVNode, Fragment } from 'vue';
2
2
  import axios$2 from 'axios';
3
3
 
4
4
  const Events$1 = {
@@ -5714,6 +5714,7 @@ const Endpoint = RTCEndpoint;
5714
5714
  class WebRtcMt$1 {
5715
5715
  constructor(opt) {
5716
5716
  this.opt = opt;
5717
+ this.p_player = ref(null);
5717
5718
  this.init(opt);
5718
5719
  }
5719
5720
  opt;
@@ -5753,7 +5754,7 @@ class WebRtcMt$1 {
5753
5754
  if (opt.h) this.config.h = opt.h;
5754
5755
  if (opt.w) this.config.w = opt.w;
5755
5756
  if (Object.prototype.toString.call(opt.plays) === "[object Object]") {
5756
- this.p_player = this.createVideo(opt.plays);
5757
+ this.p_player.value = this.createVideo(opt.plays);
5757
5758
  } else {
5758
5759
  for (const i of opt.plays) {
5759
5760
  this.createVideo(i);
@@ -5777,9 +5778,6 @@ class WebRtcMt$1 {
5777
5778
  resolve(res);
5778
5779
  } else {
5779
5780
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5780
- setTimeout(() => {
5781
- this.rePlay();
5782
- }, 10 * 1e3);
5783
5781
  reject(false);
5784
5782
  }
5785
5783
  });
@@ -5852,8 +5850,9 @@ class WebRtcMt$1 {
5852
5850
  console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
5853
5851
  this.stopPlay();
5854
5852
  setTimeout(() => {
5855
- console.log("\u5E95\u90E8\u91CD\u64AD");
5856
- this.p_player = false;
5853
+ console.log("\u5E95\u90E8\u91CD\u64AD---");
5854
+ this.p_player.value = false;
5855
+ console.info("v2---", this.p_player.value);
5857
5856
  }, 5 * 1e3);
5858
5857
  }
5859
5858
  // 播放
@@ -5943,7 +5942,7 @@ const VideoPlayerV2 = defineComponent({
5943
5942
  props: props$1,
5944
5943
  emits: ["changeStream"],
5945
5944
  setup(_prop, _context) {
5946
- const play = ref(null);
5945
+ let play = reactive(null);
5947
5946
  const uuid = _prop.domId;
5948
5947
  const videoFull = id => {
5949
5948
  const elm = document.getElementById(`videoPlayer_${uuid}`);
@@ -5964,19 +5963,19 @@ const VideoPlayerV2 = defineComponent({
5964
5963
  };
5965
5964
  const videoInfo2 = ref({});
5966
5965
  const stopPlay = () => {
5967
- if (play.value) {
5968
- play.value.stopPlay(`videoPlayer_${uuid}`);
5966
+ if (play) {
5967
+ play.stopPlay(`videoPlayer_${uuid}`);
5969
5968
  }
5970
5969
  };
5971
5970
  const init = () => {
5972
- play.value = null;
5971
+ play = null;
5973
5972
  let camera = videoInfo2.value;
5974
5973
  camera = {
5975
5974
  ...camera,
5976
5975
  ..._prop.cameraConfig
5977
5976
  };
5978
5977
  let url = camera.webrtcTemplateMerged;
5979
- play.value = new WebRtcMt$1({
5978
+ play = reactive(new WebRtcMt$1({
5980
5979
  plays: {
5981
5980
  videoElm: `videoPlayer_${uuid}`,
5982
5981
  mediaServerAddr: camera.mediaServerPo.url,
@@ -5988,7 +5987,7 @@ const VideoPlayerV2 = defineComponent({
5988
5987
  cameraStream: camera.streamType,
5989
5988
  addRtspProxyUrl: url
5990
5989
  }
5991
- });
5990
+ }));
5992
5991
  };
5993
5992
  const releaseUrl = ref("");
5994
5993
  const release = async () => {
@@ -6044,7 +6043,7 @@ const VideoPlayerV2 = defineComponent({
6044
6043
  immediate: true,
6045
6044
  deep: true
6046
6045
  });
6047
- watch(() => play.value?.p_player, nval => {
6046
+ watch(() => play?.p_player, nval => {
6048
6047
  if (nval) {
6049
6048
  console.info("p_player ===> ", nval);
6050
6049
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mtxt-ui3",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "系统运营组件库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",