mtxt-ui3 0.0.26 → 0.0.27

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.
@@ -6557,19 +6557,15 @@ class WebRtcMt$1 {
6557
6557
  response.json().then(res => {
6558
6558
  if (res.code === 0) {
6559
6559
  this.startPlay(plays);
6560
+ resolve(res);
6560
6561
  } else {
6561
6562
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6562
- setTimeout(() => {
6563
- this.rePlay();
6564
- }, 10 * 1e3);
6563
+ reject();
6565
6564
  }
6566
- resolve(res);
6567
6565
  });
6568
6566
  }).catch(err => {
6569
6567
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6570
- setTimeout(() => {
6571
- this.rePlay();
6572
- }, 10 * 1e3);
6568
+ reject();
6573
6569
  });
6574
6570
  });
6575
6571
  }
@@ -6626,6 +6622,9 @@ class WebRtcMt$1 {
6626
6622
  });
6627
6623
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6628
6624
  console.log("webrtc:" + state);
6625
+ if (state === "disconnected" || state === "failed") {
6626
+ this.rePlay(videoElm);
6627
+ }
6629
6628
  });
6630
6629
  }
6631
6630
  // 重播
@@ -6753,6 +6752,10 @@ const VideoPlayerV2 = vue.defineComponent({
6753
6752
  addRtspProxyUrl: url
6754
6753
  }
6755
6754
  });
6755
+ play.p_player.catch(error => {
6756
+ console.log("add 500!");
6757
+ getVideoDetail(_prop.camera);
6758
+ });
6756
6759
  };
6757
6760
  const releaseUrl = vue.ref("");
6758
6761
  const release = async () => {
@@ -6547,19 +6547,15 @@ class WebRtcMt$1 {
6547
6547
  response.json().then(res => {
6548
6548
  if (res.code === 0) {
6549
6549
  this.startPlay(plays);
6550
+ resolve(res);
6550
6551
  } else {
6551
6552
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6552
- setTimeout(() => {
6553
- this.rePlay();
6554
- }, 10 * 1e3);
6553
+ reject();
6555
6554
  }
6556
- resolve(res);
6557
6555
  });
6558
6556
  }).catch(err => {
6559
6557
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6560
- setTimeout(() => {
6561
- this.rePlay();
6562
- }, 10 * 1e3);
6558
+ reject();
6563
6559
  });
6564
6560
  });
6565
6561
  }
@@ -6616,6 +6612,9 @@ class WebRtcMt$1 {
6616
6612
  });
6617
6613
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6618
6614
  console.log("webrtc:" + state);
6615
+ if (state === "disconnected" || state === "failed") {
6616
+ this.rePlay(videoElm);
6617
+ }
6619
6618
  });
6620
6619
  }
6621
6620
  // 重播
@@ -6743,6 +6742,10 @@ const VideoPlayerV2 = defineComponent({
6743
6742
  addRtspProxyUrl: url
6744
6743
  }
6745
6744
  });
6745
+ play.p_player.catch(error => {
6746
+ console.log("add 500!");
6747
+ getVideoDetail(_prop.camera);
6748
+ });
6746
6749
  };
6747
6750
  const releaseUrl = ref("");
6748
6751
  const release = async () => {
@@ -5967,19 +5967,15 @@ class WebRtcMt {
5967
5967
  response.json().then(res => {
5968
5968
  if (res.code === 0) {
5969
5969
  this.startPlay(plays);
5970
+ resolve(res);
5970
5971
  } else {
5971
5972
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5972
- setTimeout(() => {
5973
- this.rePlay();
5974
- }, 10 * 1e3);
5973
+ reject();
5975
5974
  }
5976
- resolve(res);
5977
5975
  });
5978
5976
  }).catch(err => {
5979
5977
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
5980
- setTimeout(() => {
5981
- this.rePlay();
5982
- }, 10 * 1e3);
5978
+ reject();
5983
5979
  });
5984
5980
  });
5985
5981
  }
@@ -6036,6 +6032,9 @@ class WebRtcMt {
6036
6032
  });
6037
6033
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6038
6034
  console.log("webrtc:" + state);
6035
+ if (state === "disconnected" || state === "failed") {
6036
+ this.rePlay(videoElm);
6037
+ }
6039
6038
  });
6040
6039
  }
6041
6040
  // 重播
@@ -5958,19 +5958,15 @@ class WebRtcMt {
5958
5958
  response.json().then(res => {
5959
5959
  if (res.code === 0) {
5960
5960
  this.startPlay(plays);
5961
+ resolve(res);
5961
5962
  } else {
5962
5963
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5963
- setTimeout(() => {
5964
- this.rePlay();
5965
- }, 10 * 1e3);
5964
+ reject();
5966
5965
  }
5967
- resolve(res);
5968
5966
  });
5969
5967
  }).catch(err => {
5970
5968
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
5971
- setTimeout(() => {
5972
- this.rePlay();
5973
- }, 10 * 1e3);
5969
+ reject();
5974
5970
  });
5975
5971
  });
5976
5972
  }
@@ -6027,6 +6023,9 @@ class WebRtcMt {
6027
6023
  });
6028
6024
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6029
6025
  console.log("webrtc:" + state);
6026
+ if (state === "disconnected" || state === "failed") {
6027
+ this.rePlay(videoElm);
6028
+ }
6030
6029
  });
6031
6030
  }
6032
6031
  // 重播
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.25";
24
+ var version = "0.0.26";
25
25
 
26
26
  const setRem = opt => {
27
27
  const fontSize = opt.fontSize || 14;
@@ -6573,19 +6573,15 @@ class WebRtcMt$1 {
6573
6573
  response.json().then(res => {
6574
6574
  if (res.code === 0) {
6575
6575
  this.startPlay(plays);
6576
+ resolve(res);
6576
6577
  } else {
6577
6578
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6578
- setTimeout(() => {
6579
- this.rePlay();
6580
- }, 10 * 1e3);
6579
+ reject();
6581
6580
  }
6582
- resolve(res);
6583
6581
  });
6584
6582
  }).catch(err => {
6585
6583
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6586
- setTimeout(() => {
6587
- this.rePlay();
6588
- }, 10 * 1e3);
6584
+ reject();
6589
6585
  });
6590
6586
  });
6591
6587
  }
@@ -6642,6 +6638,9 @@ class WebRtcMt$1 {
6642
6638
  });
6643
6639
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6644
6640
  console.log("webrtc:" + state);
6641
+ if (state === "disconnected" || state === "failed") {
6642
+ this.rePlay(videoElm);
6643
+ }
6645
6644
  });
6646
6645
  }
6647
6646
  // 重播
@@ -7284,6 +7283,10 @@ const VideoPlayerV2 = vue.defineComponent({
7284
7283
  addRtspProxyUrl: url
7285
7284
  }
7286
7285
  });
7286
+ play.p_player.catch(error => {
7287
+ console.log("add 500!");
7288
+ getVideoDetail(_prop.camera);
7289
+ });
7287
7290
  };
7288
7291
  const releaseUrl = vue.ref("");
7289
7292
  const release = async () => {
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.25";
10
+ var version = "0.0.26";
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.25";
12
+ var version = "0.0.26";
13
13
 
14
14
  const setRem = opt => {
15
15
  const fontSize = opt.fontSize || 14;
@@ -6561,19 +6561,15 @@ class WebRtcMt$1 {
6561
6561
  response.json().then(res => {
6562
6562
  if (res.code === 0) {
6563
6563
  this.startPlay(plays);
6564
+ resolve(res);
6564
6565
  } else {
6565
6566
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6566
- setTimeout(() => {
6567
- this.rePlay();
6568
- }, 10 * 1e3);
6567
+ reject();
6569
6568
  }
6570
- resolve(res);
6571
6569
  });
6572
6570
  }).catch(err => {
6573
6571
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6574
- setTimeout(() => {
6575
- this.rePlay();
6576
- }, 10 * 1e3);
6572
+ reject();
6577
6573
  });
6578
6574
  });
6579
6575
  }
@@ -6630,6 +6626,9 @@ class WebRtcMt$1 {
6630
6626
  });
6631
6627
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6632
6628
  console.log("webrtc:" + state);
6629
+ if (state === "disconnected" || state === "failed") {
6630
+ this.rePlay(videoElm);
6631
+ }
6633
6632
  });
6634
6633
  }
6635
6634
  // 重播
@@ -7272,6 +7271,10 @@ const VideoPlayerV2 = defineComponent({
7272
7271
  addRtspProxyUrl: url
7273
7272
  }
7274
7273
  });
7274
+ play.p_player.catch(error => {
7275
+ console.log("add 500!");
7276
+ getVideoDetail(_prop.camera);
7277
+ });
7275
7278
  };
7276
7279
  const releaseUrl = ref("");
7277
7280
  const release = async () => {
@@ -5782,19 +5782,15 @@ class WebRtcMt$1 {
5782
5782
  response.json().then(res => {
5783
5783
  if (res.code === 0) {
5784
5784
  this.startPlay(plays);
5785
+ resolve(res);
5785
5786
  } else {
5786
5787
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5787
- setTimeout(() => {
5788
- this.rePlay();
5789
- }, 10 * 1e3);
5788
+ reject();
5790
5789
  }
5791
- resolve(res);
5792
5790
  });
5793
5791
  }).catch(err => {
5794
5792
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
5795
- setTimeout(() => {
5796
- this.rePlay();
5797
- }, 10 * 1e3);
5793
+ reject();
5798
5794
  });
5799
5795
  });
5800
5796
  }
@@ -5851,6 +5847,9 @@ class WebRtcMt$1 {
5851
5847
  });
5852
5848
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
5853
5849
  console.log("webrtc:" + state);
5850
+ if (state === "disconnected" || state === "failed") {
5851
+ this.rePlay(videoElm);
5852
+ }
5854
5853
  });
5855
5854
  }
5856
5855
  // 重播
@@ -5995,6 +5994,10 @@ const VideoPlayerV2 = vue.defineComponent({
5995
5994
  addRtspProxyUrl: url
5996
5995
  }
5997
5996
  });
5997
+ play.p_player.catch(error => {
5998
+ console.log("add 500!");
5999
+ getVideoDetail(_prop.camera);
6000
+ });
5998
6001
  };
5999
6002
  const releaseUrl = vue.ref("");
6000
6003
  const release = async () => {
@@ -5774,19 +5774,15 @@ class WebRtcMt$1 {
5774
5774
  response.json().then(res => {
5775
5775
  if (res.code === 0) {
5776
5776
  this.startPlay(plays);
5777
+ resolve(res);
5777
5778
  } else {
5778
5779
  console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
5779
- setTimeout(() => {
5780
- this.rePlay();
5781
- }, 10 * 1e3);
5780
+ reject();
5782
5781
  }
5783
- resolve(res);
5784
5782
  });
5785
5783
  }).catch(err => {
5786
5784
  console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
5787
- setTimeout(() => {
5788
- this.rePlay();
5789
- }, 10 * 1e3);
5785
+ reject();
5790
5786
  });
5791
5787
  });
5792
5788
  }
@@ -5843,6 +5839,9 @@ class WebRtcMt$1 {
5843
5839
  });
5844
5840
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
5845
5841
  console.log("webrtc:" + state);
5842
+ if (state === "disconnected" || state === "failed") {
5843
+ this.rePlay(videoElm);
5844
+ }
5846
5845
  });
5847
5846
  }
5848
5847
  // 重播
@@ -5987,6 +5986,10 @@ const VideoPlayerV2 = defineComponent({
5987
5986
  addRtspProxyUrl: url
5988
5987
  }
5989
5988
  });
5989
+ play.p_player.catch(error => {
5990
+ console.log("add 500!");
5991
+ getVideoDetail(_prop.camera);
5992
+ });
5990
5993
  };
5991
5994
  const releaseUrl = ref("");
5992
5995
  const release = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mtxt-ui3",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "系统运营组件库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",