mtxt-ui3 0.0.27 → 0.0.29
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.
- package/dist/components/index.cjs +17 -12
- package/dist/components/index.js +17 -12
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.js +3 -3
- package/dist/index.cjs +18 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -13
- package/dist/video/index.cjs +17 -12
- package/dist/video/index.js +17 -12
- package/package.json +1 -1
|
@@ -6560,12 +6560,12 @@ class WebRtcMt$1 {
|
|
|
6560
6560
|
resolve(res);
|
|
6561
6561
|
} else {
|
|
6562
6562
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6563
|
-
reject();
|
|
6563
|
+
reject(false);
|
|
6564
6564
|
}
|
|
6565
6565
|
});
|
|
6566
6566
|
}).catch(err => {
|
|
6567
6567
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6568
|
-
reject();
|
|
6568
|
+
reject(false);
|
|
6569
6569
|
});
|
|
6570
6570
|
});
|
|
6571
6571
|
}
|
|
@@ -6633,7 +6633,7 @@ class WebRtcMt$1 {
|
|
|
6633
6633
|
this.stopPlay();
|
|
6634
6634
|
setTimeout(() => {
|
|
6635
6635
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6636
|
-
this.
|
|
6636
|
+
this.p_player = false;
|
|
6637
6637
|
}, 5 * 1e3);
|
|
6638
6638
|
}
|
|
6639
6639
|
// 播放
|
|
@@ -6706,7 +6706,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6706
6706
|
props: props$7,
|
|
6707
6707
|
emits: ["changeStream"],
|
|
6708
6708
|
setup(_prop, _context) {
|
|
6709
|
-
|
|
6709
|
+
const play = vue.ref(null);
|
|
6710
6710
|
const uuid = _prop.domId;
|
|
6711
6711
|
const videoFull = id => {
|
|
6712
6712
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -6727,19 +6727,19 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6727
6727
|
};
|
|
6728
6728
|
const videoInfo2 = vue.ref({});
|
|
6729
6729
|
const stopPlay = () => {
|
|
6730
|
-
if (play) {
|
|
6731
|
-
play.stopPlay(`videoPlayer_${uuid}`);
|
|
6730
|
+
if (play.value) {
|
|
6731
|
+
play.value.stopPlay(`videoPlayer_${uuid}`);
|
|
6732
6732
|
}
|
|
6733
6733
|
};
|
|
6734
6734
|
const init = () => {
|
|
6735
|
-
play = null;
|
|
6735
|
+
play.value = null;
|
|
6736
6736
|
let camera = videoInfo2.value;
|
|
6737
6737
|
camera = {
|
|
6738
6738
|
...camera,
|
|
6739
6739
|
..._prop.cameraConfig
|
|
6740
6740
|
};
|
|
6741
6741
|
let url = camera.webrtcTemplateMerged;
|
|
6742
|
-
play = new WebRtcMt$1({
|
|
6742
|
+
play.value = new WebRtcMt$1({
|
|
6743
6743
|
plays: {
|
|
6744
6744
|
videoElm: `videoPlayer_${uuid}`,
|
|
6745
6745
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -6752,10 +6752,6 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6752
6752
|
addRtspProxyUrl: url
|
|
6753
6753
|
}
|
|
6754
6754
|
});
|
|
6755
|
-
play.p_player.catch(error => {
|
|
6756
|
-
console.log("add 500!");
|
|
6757
|
-
getVideoDetail(_prop.camera);
|
|
6758
|
-
});
|
|
6759
6755
|
};
|
|
6760
6756
|
const releaseUrl = vue.ref("");
|
|
6761
6757
|
const release = async () => {
|
|
@@ -6811,6 +6807,15 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6811
6807
|
immediate: true,
|
|
6812
6808
|
deep: true
|
|
6813
6809
|
});
|
|
6810
|
+
vue.watch(() => play.value?.player, nval => {
|
|
6811
|
+
if (nval) {
|
|
6812
|
+
console.info("player ===> ", nval);
|
|
6813
|
+
} else {
|
|
6814
|
+
console.log("player ===> add 500!");
|
|
6815
|
+
stopPlay();
|
|
6816
|
+
getVideoDetail(_prop.camera);
|
|
6817
|
+
}
|
|
6818
|
+
});
|
|
6814
6819
|
vue.onBeforeUnmount(() => {
|
|
6815
6820
|
stopPlay();
|
|
6816
6821
|
});
|
package/dist/components/index.js
CHANGED
|
@@ -6550,12 +6550,12 @@ class WebRtcMt$1 {
|
|
|
6550
6550
|
resolve(res);
|
|
6551
6551
|
} else {
|
|
6552
6552
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6553
|
-
reject();
|
|
6553
|
+
reject(false);
|
|
6554
6554
|
}
|
|
6555
6555
|
});
|
|
6556
6556
|
}).catch(err => {
|
|
6557
6557
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6558
|
-
reject();
|
|
6558
|
+
reject(false);
|
|
6559
6559
|
});
|
|
6560
6560
|
});
|
|
6561
6561
|
}
|
|
@@ -6623,7 +6623,7 @@ class WebRtcMt$1 {
|
|
|
6623
6623
|
this.stopPlay();
|
|
6624
6624
|
setTimeout(() => {
|
|
6625
6625
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6626
|
-
this.
|
|
6626
|
+
this.p_player = false;
|
|
6627
6627
|
}, 5 * 1e3);
|
|
6628
6628
|
}
|
|
6629
6629
|
// 播放
|
|
@@ -6696,7 +6696,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6696
6696
|
props: props$7,
|
|
6697
6697
|
emits: ["changeStream"],
|
|
6698
6698
|
setup(_prop, _context) {
|
|
6699
|
-
|
|
6699
|
+
const play = ref(null);
|
|
6700
6700
|
const uuid = _prop.domId;
|
|
6701
6701
|
const videoFull = id => {
|
|
6702
6702
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -6717,19 +6717,19 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6717
6717
|
};
|
|
6718
6718
|
const videoInfo2 = ref({});
|
|
6719
6719
|
const stopPlay = () => {
|
|
6720
|
-
if (play) {
|
|
6721
|
-
play.stopPlay(`videoPlayer_${uuid}`);
|
|
6720
|
+
if (play.value) {
|
|
6721
|
+
play.value.stopPlay(`videoPlayer_${uuid}`);
|
|
6722
6722
|
}
|
|
6723
6723
|
};
|
|
6724
6724
|
const init = () => {
|
|
6725
|
-
play = null;
|
|
6725
|
+
play.value = null;
|
|
6726
6726
|
let camera = videoInfo2.value;
|
|
6727
6727
|
camera = {
|
|
6728
6728
|
...camera,
|
|
6729
6729
|
..._prop.cameraConfig
|
|
6730
6730
|
};
|
|
6731
6731
|
let url = camera.webrtcTemplateMerged;
|
|
6732
|
-
play = new WebRtcMt$1({
|
|
6732
|
+
play.value = new WebRtcMt$1({
|
|
6733
6733
|
plays: {
|
|
6734
6734
|
videoElm: `videoPlayer_${uuid}`,
|
|
6735
6735
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -6742,10 +6742,6 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6742
6742
|
addRtspProxyUrl: url
|
|
6743
6743
|
}
|
|
6744
6744
|
});
|
|
6745
|
-
play.p_player.catch(error => {
|
|
6746
|
-
console.log("add 500!");
|
|
6747
|
-
getVideoDetail(_prop.camera);
|
|
6748
|
-
});
|
|
6749
6745
|
};
|
|
6750
6746
|
const releaseUrl = ref("");
|
|
6751
6747
|
const release = async () => {
|
|
@@ -6801,6 +6797,15 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6801
6797
|
immediate: true,
|
|
6802
6798
|
deep: true
|
|
6803
6799
|
});
|
|
6800
|
+
watch(() => play.value?.player, nval => {
|
|
6801
|
+
if (nval) {
|
|
6802
|
+
console.info("player ===> ", nval);
|
|
6803
|
+
} else {
|
|
6804
|
+
console.log("player ===> add 500!");
|
|
6805
|
+
stopPlay();
|
|
6806
|
+
getVideoDetail(_prop.camera);
|
|
6807
|
+
}
|
|
6808
|
+
});
|
|
6804
6809
|
onBeforeUnmount(() => {
|
|
6805
6810
|
stopPlay();
|
|
6806
6811
|
});
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -5970,12 +5970,12 @@ class WebRtcMt {
|
|
|
5970
5970
|
resolve(res);
|
|
5971
5971
|
} else {
|
|
5972
5972
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
5973
|
-
reject();
|
|
5973
|
+
reject(false);
|
|
5974
5974
|
}
|
|
5975
5975
|
});
|
|
5976
5976
|
}).catch(err => {
|
|
5977
5977
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
5978
|
-
reject();
|
|
5978
|
+
reject(false);
|
|
5979
5979
|
});
|
|
5980
5980
|
});
|
|
5981
5981
|
}
|
|
@@ -6043,7 +6043,7 @@ class WebRtcMt {
|
|
|
6043
6043
|
this.stopPlay();
|
|
6044
6044
|
setTimeout(() => {
|
|
6045
6045
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6046
|
-
this.
|
|
6046
|
+
this.p_player = false;
|
|
6047
6047
|
}, 5 * 1e3);
|
|
6048
6048
|
}
|
|
6049
6049
|
// 播放
|
package/dist/hooks/index.js
CHANGED
|
@@ -5961,12 +5961,12 @@ class WebRtcMt {
|
|
|
5961
5961
|
resolve(res);
|
|
5962
5962
|
} else {
|
|
5963
5963
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
5964
|
-
reject();
|
|
5964
|
+
reject(false);
|
|
5965
5965
|
}
|
|
5966
5966
|
});
|
|
5967
5967
|
}).catch(err => {
|
|
5968
5968
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
5969
|
-
reject();
|
|
5969
|
+
reject(false);
|
|
5970
5970
|
});
|
|
5971
5971
|
});
|
|
5972
5972
|
}
|
|
@@ -6034,7 +6034,7 @@ class WebRtcMt {
|
|
|
6034
6034
|
this.stopPlay();
|
|
6035
6035
|
setTimeout(() => {
|
|
6036
6036
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6037
|
-
this.
|
|
6037
|
+
this.p_player = false;
|
|
6038
6038
|
}, 5 * 1e3);
|
|
6039
6039
|
}
|
|
6040
6040
|
// 播放
|
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.
|
|
24
|
+
var version = "0.0.28";
|
|
25
25
|
|
|
26
26
|
const setRem = opt => {
|
|
27
27
|
const fontSize = opt.fontSize || 14;
|
|
@@ -6576,12 +6576,12 @@ class WebRtcMt$1 {
|
|
|
6576
6576
|
resolve(res);
|
|
6577
6577
|
} else {
|
|
6578
6578
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6579
|
-
reject();
|
|
6579
|
+
reject(false);
|
|
6580
6580
|
}
|
|
6581
6581
|
});
|
|
6582
6582
|
}).catch(err => {
|
|
6583
6583
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6584
|
-
reject();
|
|
6584
|
+
reject(false);
|
|
6585
6585
|
});
|
|
6586
6586
|
});
|
|
6587
6587
|
}
|
|
@@ -6649,7 +6649,7 @@ class WebRtcMt$1 {
|
|
|
6649
6649
|
this.stopPlay();
|
|
6650
6650
|
setTimeout(() => {
|
|
6651
6651
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6652
|
-
this.
|
|
6652
|
+
this.p_player = false;
|
|
6653
6653
|
}, 5 * 1e3);
|
|
6654
6654
|
}
|
|
6655
6655
|
// 播放
|
|
@@ -7237,7 +7237,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7237
7237
|
props: props$7,
|
|
7238
7238
|
emits: ["changeStream"],
|
|
7239
7239
|
setup(_prop, _context) {
|
|
7240
|
-
|
|
7240
|
+
const play = vue.ref(null);
|
|
7241
7241
|
const uuid = _prop.domId;
|
|
7242
7242
|
const videoFull = id => {
|
|
7243
7243
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -7258,19 +7258,19 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7258
7258
|
};
|
|
7259
7259
|
const videoInfo2 = vue.ref({});
|
|
7260
7260
|
const stopPlay = () => {
|
|
7261
|
-
if (play) {
|
|
7262
|
-
play.stopPlay(`videoPlayer_${uuid}`);
|
|
7261
|
+
if (play.value) {
|
|
7262
|
+
play.value.stopPlay(`videoPlayer_${uuid}`);
|
|
7263
7263
|
}
|
|
7264
7264
|
};
|
|
7265
7265
|
const init = () => {
|
|
7266
|
-
play = null;
|
|
7266
|
+
play.value = null;
|
|
7267
7267
|
let camera = videoInfo2.value;
|
|
7268
7268
|
camera = {
|
|
7269
7269
|
...camera,
|
|
7270
7270
|
..._prop.cameraConfig
|
|
7271
7271
|
};
|
|
7272
7272
|
let url = camera.webrtcTemplateMerged;
|
|
7273
|
-
play = new WebRtcMt$1({
|
|
7273
|
+
play.value = new WebRtcMt$1({
|
|
7274
7274
|
plays: {
|
|
7275
7275
|
videoElm: `videoPlayer_${uuid}`,
|
|
7276
7276
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -7283,10 +7283,6 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7283
7283
|
addRtspProxyUrl: url
|
|
7284
7284
|
}
|
|
7285
7285
|
});
|
|
7286
|
-
play.p_player.catch(error => {
|
|
7287
|
-
console.log("add 500!");
|
|
7288
|
-
getVideoDetail(_prop.camera);
|
|
7289
|
-
});
|
|
7290
7286
|
};
|
|
7291
7287
|
const releaseUrl = vue.ref("");
|
|
7292
7288
|
const release = async () => {
|
|
@@ -7342,6 +7338,15 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7342
7338
|
immediate: true,
|
|
7343
7339
|
deep: true
|
|
7344
7340
|
});
|
|
7341
|
+
vue.watch(() => play.value?.player, nval => {
|
|
7342
|
+
if (nval) {
|
|
7343
|
+
console.info("player ===> ", nval);
|
|
7344
|
+
} else {
|
|
7345
|
+
console.log("player ===> add 500!");
|
|
7346
|
+
stopPlay();
|
|
7347
|
+
getVideoDetail(_prop.camera);
|
|
7348
|
+
}
|
|
7349
|
+
});
|
|
7345
7350
|
vue.onBeforeUnmount(() => {
|
|
7346
7351
|
stopPlay();
|
|
7347
7352
|
});
|
package/dist/index.d.ts
CHANGED
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.
|
|
12
|
+
var version = "0.0.28";
|
|
13
13
|
|
|
14
14
|
const setRem = opt => {
|
|
15
15
|
const fontSize = opt.fontSize || 14;
|
|
@@ -6564,12 +6564,12 @@ class WebRtcMt$1 {
|
|
|
6564
6564
|
resolve(res);
|
|
6565
6565
|
} else {
|
|
6566
6566
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6567
|
-
reject();
|
|
6567
|
+
reject(false);
|
|
6568
6568
|
}
|
|
6569
6569
|
});
|
|
6570
6570
|
}).catch(err => {
|
|
6571
6571
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6572
|
-
reject();
|
|
6572
|
+
reject(false);
|
|
6573
6573
|
});
|
|
6574
6574
|
});
|
|
6575
6575
|
}
|
|
@@ -6637,7 +6637,7 @@ class WebRtcMt$1 {
|
|
|
6637
6637
|
this.stopPlay();
|
|
6638
6638
|
setTimeout(() => {
|
|
6639
6639
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6640
|
-
this.
|
|
6640
|
+
this.p_player = false;
|
|
6641
6641
|
}, 5 * 1e3);
|
|
6642
6642
|
}
|
|
6643
6643
|
// 播放
|
|
@@ -7225,7 +7225,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7225
7225
|
props: props$7,
|
|
7226
7226
|
emits: ["changeStream"],
|
|
7227
7227
|
setup(_prop, _context) {
|
|
7228
|
-
|
|
7228
|
+
const play = ref(null);
|
|
7229
7229
|
const uuid = _prop.domId;
|
|
7230
7230
|
const videoFull = id => {
|
|
7231
7231
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -7246,19 +7246,19 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7246
7246
|
};
|
|
7247
7247
|
const videoInfo2 = ref({});
|
|
7248
7248
|
const stopPlay = () => {
|
|
7249
|
-
if (play) {
|
|
7250
|
-
play.stopPlay(`videoPlayer_${uuid}`);
|
|
7249
|
+
if (play.value) {
|
|
7250
|
+
play.value.stopPlay(`videoPlayer_${uuid}`);
|
|
7251
7251
|
}
|
|
7252
7252
|
};
|
|
7253
7253
|
const init = () => {
|
|
7254
|
-
play = null;
|
|
7254
|
+
play.value = null;
|
|
7255
7255
|
let camera = videoInfo2.value;
|
|
7256
7256
|
camera = {
|
|
7257
7257
|
...camera,
|
|
7258
7258
|
..._prop.cameraConfig
|
|
7259
7259
|
};
|
|
7260
7260
|
let url = camera.webrtcTemplateMerged;
|
|
7261
|
-
play = new WebRtcMt$1({
|
|
7261
|
+
play.value = new WebRtcMt$1({
|
|
7262
7262
|
plays: {
|
|
7263
7263
|
videoElm: `videoPlayer_${uuid}`,
|
|
7264
7264
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -7271,10 +7271,6 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7271
7271
|
addRtspProxyUrl: url
|
|
7272
7272
|
}
|
|
7273
7273
|
});
|
|
7274
|
-
play.p_player.catch(error => {
|
|
7275
|
-
console.log("add 500!");
|
|
7276
|
-
getVideoDetail(_prop.camera);
|
|
7277
|
-
});
|
|
7278
7274
|
};
|
|
7279
7275
|
const releaseUrl = ref("");
|
|
7280
7276
|
const release = async () => {
|
|
@@ -7330,6 +7326,15 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7330
7326
|
immediate: true,
|
|
7331
7327
|
deep: true
|
|
7332
7328
|
});
|
|
7329
|
+
watch(() => play.value?.player, nval => {
|
|
7330
|
+
if (nval) {
|
|
7331
|
+
console.info("player ===> ", nval);
|
|
7332
|
+
} else {
|
|
7333
|
+
console.log("player ===> add 500!");
|
|
7334
|
+
stopPlay();
|
|
7335
|
+
getVideoDetail(_prop.camera);
|
|
7336
|
+
}
|
|
7337
|
+
});
|
|
7333
7338
|
onBeforeUnmount(() => {
|
|
7334
7339
|
stopPlay();
|
|
7335
7340
|
});
|
package/dist/video/index.cjs
CHANGED
|
@@ -5785,12 +5785,12 @@ class WebRtcMt$1 {
|
|
|
5785
5785
|
resolve(res);
|
|
5786
5786
|
} else {
|
|
5787
5787
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
5788
|
-
reject();
|
|
5788
|
+
reject(false);
|
|
5789
5789
|
}
|
|
5790
5790
|
});
|
|
5791
5791
|
}).catch(err => {
|
|
5792
5792
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
5793
|
-
reject();
|
|
5793
|
+
reject(false);
|
|
5794
5794
|
});
|
|
5795
5795
|
});
|
|
5796
5796
|
}
|
|
@@ -5858,7 +5858,7 @@ class WebRtcMt$1 {
|
|
|
5858
5858
|
this.stopPlay();
|
|
5859
5859
|
setTimeout(() => {
|
|
5860
5860
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
5861
|
-
this.
|
|
5861
|
+
this.p_player = false;
|
|
5862
5862
|
}, 5 * 1e3);
|
|
5863
5863
|
}
|
|
5864
5864
|
// 播放
|
|
@@ -5948,7 +5948,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
5948
5948
|
props: props$1,
|
|
5949
5949
|
emits: ["changeStream"],
|
|
5950
5950
|
setup(_prop, _context) {
|
|
5951
|
-
|
|
5951
|
+
const play = vue.ref(null);
|
|
5952
5952
|
const uuid = _prop.domId;
|
|
5953
5953
|
const videoFull = id => {
|
|
5954
5954
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -5969,19 +5969,19 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
5969
5969
|
};
|
|
5970
5970
|
const videoInfo2 = vue.ref({});
|
|
5971
5971
|
const stopPlay = () => {
|
|
5972
|
-
if (play) {
|
|
5973
|
-
play.stopPlay(`videoPlayer_${uuid}`);
|
|
5972
|
+
if (play.value) {
|
|
5973
|
+
play.value.stopPlay(`videoPlayer_${uuid}`);
|
|
5974
5974
|
}
|
|
5975
5975
|
};
|
|
5976
5976
|
const init = () => {
|
|
5977
|
-
play = null;
|
|
5977
|
+
play.value = null;
|
|
5978
5978
|
let camera = videoInfo2.value;
|
|
5979
5979
|
camera = {
|
|
5980
5980
|
...camera,
|
|
5981
5981
|
..._prop.cameraConfig
|
|
5982
5982
|
};
|
|
5983
5983
|
let url = camera.webrtcTemplateMerged;
|
|
5984
|
-
play = new WebRtcMt$1({
|
|
5984
|
+
play.value = new WebRtcMt$1({
|
|
5985
5985
|
plays: {
|
|
5986
5986
|
videoElm: `videoPlayer_${uuid}`,
|
|
5987
5987
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -5994,10 +5994,6 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
5994
5994
|
addRtspProxyUrl: url
|
|
5995
5995
|
}
|
|
5996
5996
|
});
|
|
5997
|
-
play.p_player.catch(error => {
|
|
5998
|
-
console.log("add 500!");
|
|
5999
|
-
getVideoDetail(_prop.camera);
|
|
6000
|
-
});
|
|
6001
5997
|
};
|
|
6002
5998
|
const releaseUrl = vue.ref("");
|
|
6003
5999
|
const release = async () => {
|
|
@@ -6053,6 +6049,15 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6053
6049
|
immediate: true,
|
|
6054
6050
|
deep: true
|
|
6055
6051
|
});
|
|
6052
|
+
vue.watch(() => play.value?.player, nval => {
|
|
6053
|
+
if (nval) {
|
|
6054
|
+
console.info("player ===> ", nval);
|
|
6055
|
+
} else {
|
|
6056
|
+
console.log("player ===> add 500!");
|
|
6057
|
+
stopPlay();
|
|
6058
|
+
getVideoDetail(_prop.camera);
|
|
6059
|
+
}
|
|
6060
|
+
});
|
|
6056
6061
|
vue.onBeforeUnmount(() => {
|
|
6057
6062
|
stopPlay();
|
|
6058
6063
|
});
|
package/dist/video/index.js
CHANGED
|
@@ -5777,12 +5777,12 @@ class WebRtcMt$1 {
|
|
|
5777
5777
|
resolve(res);
|
|
5778
5778
|
} else {
|
|
5779
5779
|
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
5780
|
-
reject();
|
|
5780
|
+
reject(false);
|
|
5781
5781
|
}
|
|
5782
5782
|
});
|
|
5783
5783
|
}).catch(err => {
|
|
5784
5784
|
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
5785
|
-
reject();
|
|
5785
|
+
reject(false);
|
|
5786
5786
|
});
|
|
5787
5787
|
});
|
|
5788
5788
|
}
|
|
@@ -5850,7 +5850,7 @@ class WebRtcMt$1 {
|
|
|
5850
5850
|
this.stopPlay();
|
|
5851
5851
|
setTimeout(() => {
|
|
5852
5852
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
5853
|
-
this.
|
|
5853
|
+
this.p_player = false;
|
|
5854
5854
|
}, 5 * 1e3);
|
|
5855
5855
|
}
|
|
5856
5856
|
// 播放
|
|
@@ -5940,7 +5940,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
5940
5940
|
props: props$1,
|
|
5941
5941
|
emits: ["changeStream"],
|
|
5942
5942
|
setup(_prop, _context) {
|
|
5943
|
-
|
|
5943
|
+
const play = ref(null);
|
|
5944
5944
|
const uuid = _prop.domId;
|
|
5945
5945
|
const videoFull = id => {
|
|
5946
5946
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -5961,19 +5961,19 @@ const VideoPlayerV2 = defineComponent({
|
|
|
5961
5961
|
};
|
|
5962
5962
|
const videoInfo2 = ref({});
|
|
5963
5963
|
const stopPlay = () => {
|
|
5964
|
-
if (play) {
|
|
5965
|
-
play.stopPlay(`videoPlayer_${uuid}`);
|
|
5964
|
+
if (play.value) {
|
|
5965
|
+
play.value.stopPlay(`videoPlayer_${uuid}`);
|
|
5966
5966
|
}
|
|
5967
5967
|
};
|
|
5968
5968
|
const init = () => {
|
|
5969
|
-
play = null;
|
|
5969
|
+
play.value = null;
|
|
5970
5970
|
let camera = videoInfo2.value;
|
|
5971
5971
|
camera = {
|
|
5972
5972
|
...camera,
|
|
5973
5973
|
..._prop.cameraConfig
|
|
5974
5974
|
};
|
|
5975
5975
|
let url = camera.webrtcTemplateMerged;
|
|
5976
|
-
play = new WebRtcMt$1({
|
|
5976
|
+
play.value = new WebRtcMt$1({
|
|
5977
5977
|
plays: {
|
|
5978
5978
|
videoElm: `videoPlayer_${uuid}`,
|
|
5979
5979
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -5986,10 +5986,6 @@ const VideoPlayerV2 = defineComponent({
|
|
|
5986
5986
|
addRtspProxyUrl: url
|
|
5987
5987
|
}
|
|
5988
5988
|
});
|
|
5989
|
-
play.p_player.catch(error => {
|
|
5990
|
-
console.log("add 500!");
|
|
5991
|
-
getVideoDetail(_prop.camera);
|
|
5992
|
-
});
|
|
5993
5989
|
};
|
|
5994
5990
|
const releaseUrl = ref("");
|
|
5995
5991
|
const release = async () => {
|
|
@@ -6045,6 +6041,15 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6045
6041
|
immediate: true,
|
|
6046
6042
|
deep: true
|
|
6047
6043
|
});
|
|
6044
|
+
watch(() => play.value?.player, nval => {
|
|
6045
|
+
if (nval) {
|
|
6046
|
+
console.info("player ===> ", nval);
|
|
6047
|
+
} else {
|
|
6048
|
+
console.log("player ===> add 500!");
|
|
6049
|
+
stopPlay();
|
|
6050
|
+
getVideoDetail(_prop.camera);
|
|
6051
|
+
}
|
|
6052
|
+
});
|
|
6048
6053
|
onBeforeUnmount(() => {
|
|
6049
6054
|
stopPlay();
|
|
6050
6055
|
});
|