mtxt-ui3 0.0.31 → 0.0.33
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 +12 -14
- package/dist/components/index.js +12 -14
- package/dist/hooks/index.cjs +3 -5
- package/dist/hooks/index.js +3 -5
- package/dist/index.cjs +13 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -15
- package/dist/video/index.cjs +12 -14
- package/dist/video/index.js +13 -15
- package/package.json +1 -1
|
@@ -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
|
});
|
|
@@ -6636,7 +6634,7 @@ class WebRtcMt$1 {
|
|
|
6636
6634
|
this.stopPlay();
|
|
6637
6635
|
setTimeout(() => {
|
|
6638
6636
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6639
|
-
this.p_player = false;
|
|
6637
|
+
this.p_player.value = false;
|
|
6640
6638
|
}, 5 * 1e3);
|
|
6641
6639
|
}
|
|
6642
6640
|
// 播放
|
|
@@ -6709,7 +6707,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6709
6707
|
props: props$7,
|
|
6710
6708
|
emits: ["changeStream"],
|
|
6711
6709
|
setup(_prop, _context) {
|
|
6712
|
-
|
|
6710
|
+
let play = vue.reactive(null);
|
|
6713
6711
|
const uuid = _prop.domId;
|
|
6714
6712
|
const videoFull = id => {
|
|
6715
6713
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -6730,19 +6728,19 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6730
6728
|
};
|
|
6731
6729
|
const videoInfo2 = vue.ref({});
|
|
6732
6730
|
const stopPlay = () => {
|
|
6733
|
-
if (play
|
|
6734
|
-
play.
|
|
6731
|
+
if (play) {
|
|
6732
|
+
play.stopPlay(`videoPlayer_${uuid}`);
|
|
6735
6733
|
}
|
|
6736
6734
|
};
|
|
6737
6735
|
const init = () => {
|
|
6738
|
-
play
|
|
6736
|
+
play = null;
|
|
6739
6737
|
let camera = videoInfo2.value;
|
|
6740
6738
|
camera = {
|
|
6741
6739
|
...camera,
|
|
6742
6740
|
..._prop.cameraConfig
|
|
6743
6741
|
};
|
|
6744
6742
|
let url = camera.webrtcTemplateMerged;
|
|
6745
|
-
play
|
|
6743
|
+
play = vue.reactive(new WebRtcMt$1({
|
|
6746
6744
|
plays: {
|
|
6747
6745
|
videoElm: `videoPlayer_${uuid}`,
|
|
6748
6746
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -6754,7 +6752,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6754
6752
|
cameraStream: camera.streamType,
|
|
6755
6753
|
addRtspProxyUrl: url
|
|
6756
6754
|
}
|
|
6757
|
-
});
|
|
6755
|
+
}));
|
|
6758
6756
|
};
|
|
6759
6757
|
const releaseUrl = vue.ref("");
|
|
6760
6758
|
const release = async () => {
|
|
@@ -6810,11 +6808,11 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6810
6808
|
immediate: true,
|
|
6811
6809
|
deep: true
|
|
6812
6810
|
});
|
|
6813
|
-
vue.watch(() => play
|
|
6811
|
+
vue.watch(() => play?.p_player, nval => {
|
|
6814
6812
|
if (nval) {
|
|
6815
|
-
console.info("
|
|
6813
|
+
console.info("p_player ===> ", nval);
|
|
6816
6814
|
} else {
|
|
6817
|
-
console.log("
|
|
6815
|
+
console.log("p_player ===> add 500000000!");
|
|
6818
6816
|
stopPlay();
|
|
6819
6817
|
getVideoDetail(_prop.camera);
|
|
6820
6818
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -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
|
});
|
|
@@ -6626,7 +6624,7 @@ class WebRtcMt$1 {
|
|
|
6626
6624
|
this.stopPlay();
|
|
6627
6625
|
setTimeout(() => {
|
|
6628
6626
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6629
|
-
this.p_player = false;
|
|
6627
|
+
this.p_player.value = false;
|
|
6630
6628
|
}, 5 * 1e3);
|
|
6631
6629
|
}
|
|
6632
6630
|
// 播放
|
|
@@ -6699,7 +6697,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6699
6697
|
props: props$7,
|
|
6700
6698
|
emits: ["changeStream"],
|
|
6701
6699
|
setup(_prop, _context) {
|
|
6702
|
-
|
|
6700
|
+
let play = reactive(null);
|
|
6703
6701
|
const uuid = _prop.domId;
|
|
6704
6702
|
const videoFull = id => {
|
|
6705
6703
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -6720,19 +6718,19 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6720
6718
|
};
|
|
6721
6719
|
const videoInfo2 = ref({});
|
|
6722
6720
|
const stopPlay = () => {
|
|
6723
|
-
if (play
|
|
6724
|
-
play.
|
|
6721
|
+
if (play) {
|
|
6722
|
+
play.stopPlay(`videoPlayer_${uuid}`);
|
|
6725
6723
|
}
|
|
6726
6724
|
};
|
|
6727
6725
|
const init = () => {
|
|
6728
|
-
play
|
|
6726
|
+
play = null;
|
|
6729
6727
|
let camera = videoInfo2.value;
|
|
6730
6728
|
camera = {
|
|
6731
6729
|
...camera,
|
|
6732
6730
|
..._prop.cameraConfig
|
|
6733
6731
|
};
|
|
6734
6732
|
let url = camera.webrtcTemplateMerged;
|
|
6735
|
-
play
|
|
6733
|
+
play = reactive(new WebRtcMt$1({
|
|
6736
6734
|
plays: {
|
|
6737
6735
|
videoElm: `videoPlayer_${uuid}`,
|
|
6738
6736
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -6744,7 +6742,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6744
6742
|
cameraStream: camera.streamType,
|
|
6745
6743
|
addRtspProxyUrl: url
|
|
6746
6744
|
}
|
|
6747
|
-
});
|
|
6745
|
+
}));
|
|
6748
6746
|
};
|
|
6749
6747
|
const releaseUrl = ref("");
|
|
6750
6748
|
const release = async () => {
|
|
@@ -6800,11 +6798,11 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6800
6798
|
immediate: true,
|
|
6801
6799
|
deep: true
|
|
6802
6800
|
});
|
|
6803
|
-
watch(() => play
|
|
6801
|
+
watch(() => play?.p_player, nval => {
|
|
6804
6802
|
if (nval) {
|
|
6805
|
-
console.info("
|
|
6803
|
+
console.info("p_player ===> ", nval);
|
|
6806
6804
|
} else {
|
|
6807
|
-
console.log("
|
|
6805
|
+
console.log("p_player ===> add 500000000!");
|
|
6808
6806
|
stopPlay();
|
|
6809
6807
|
getVideoDetail(_prop.camera);
|
|
6810
6808
|
}
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -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
|
});
|
|
@@ -6046,7 +6044,7 @@ class WebRtcMt {
|
|
|
6046
6044
|
this.stopPlay();
|
|
6047
6045
|
setTimeout(() => {
|
|
6048
6046
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6049
|
-
this.p_player = false;
|
|
6047
|
+
this.p_player.value = false;
|
|
6050
6048
|
}, 5 * 1e3);
|
|
6051
6049
|
}
|
|
6052
6050
|
// 播放
|
package/dist/hooks/index.js
CHANGED
|
@@ -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
|
});
|
|
@@ -6037,7 +6035,7 @@ class WebRtcMt {
|
|
|
6037
6035
|
this.stopPlay();
|
|
6038
6036
|
setTimeout(() => {
|
|
6039
6037
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6040
|
-
this.p_player = false;
|
|
6038
|
+
this.p_player.value = false;
|
|
6041
6039
|
}, 5 * 1e3);
|
|
6042
6040
|
}
|
|
6043
6041
|
// 播放
|
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.32";
|
|
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
|
});
|
|
@@ -6652,7 +6650,7 @@ class WebRtcMt$1 {
|
|
|
6652
6650
|
this.stopPlay();
|
|
6653
6651
|
setTimeout(() => {
|
|
6654
6652
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6655
|
-
this.p_player = false;
|
|
6653
|
+
this.p_player.value = false;
|
|
6656
6654
|
}, 5 * 1e3);
|
|
6657
6655
|
}
|
|
6658
6656
|
// 播放
|
|
@@ -7240,7 +7238,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7240
7238
|
props: props$7,
|
|
7241
7239
|
emits: ["changeStream"],
|
|
7242
7240
|
setup(_prop, _context) {
|
|
7243
|
-
|
|
7241
|
+
let play = vue.reactive(null);
|
|
7244
7242
|
const uuid = _prop.domId;
|
|
7245
7243
|
const videoFull = id => {
|
|
7246
7244
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -7261,19 +7259,19 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7261
7259
|
};
|
|
7262
7260
|
const videoInfo2 = vue.ref({});
|
|
7263
7261
|
const stopPlay = () => {
|
|
7264
|
-
if (play
|
|
7265
|
-
play.
|
|
7262
|
+
if (play) {
|
|
7263
|
+
play.stopPlay(`videoPlayer_${uuid}`);
|
|
7266
7264
|
}
|
|
7267
7265
|
};
|
|
7268
7266
|
const init = () => {
|
|
7269
|
-
play
|
|
7267
|
+
play = null;
|
|
7270
7268
|
let camera = videoInfo2.value;
|
|
7271
7269
|
camera = {
|
|
7272
7270
|
...camera,
|
|
7273
7271
|
..._prop.cameraConfig
|
|
7274
7272
|
};
|
|
7275
7273
|
let url = camera.webrtcTemplateMerged;
|
|
7276
|
-
play
|
|
7274
|
+
play = vue.reactive(new WebRtcMt$1({
|
|
7277
7275
|
plays: {
|
|
7278
7276
|
videoElm: `videoPlayer_${uuid}`,
|
|
7279
7277
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -7285,7 +7283,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7285
7283
|
cameraStream: camera.streamType,
|
|
7286
7284
|
addRtspProxyUrl: url
|
|
7287
7285
|
}
|
|
7288
|
-
});
|
|
7286
|
+
}));
|
|
7289
7287
|
};
|
|
7290
7288
|
const releaseUrl = vue.ref("");
|
|
7291
7289
|
const release = async () => {
|
|
@@ -7341,11 +7339,11 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
7341
7339
|
immediate: true,
|
|
7342
7340
|
deep: true
|
|
7343
7341
|
});
|
|
7344
|
-
vue.watch(() => play
|
|
7342
|
+
vue.watch(() => play?.p_player, nval => {
|
|
7345
7343
|
if (nval) {
|
|
7346
|
-
console.info("
|
|
7344
|
+
console.info("p_player ===> ", nval);
|
|
7347
7345
|
} else {
|
|
7348
|
-
console.log("
|
|
7346
|
+
console.log("p_player ===> add 500000000!");
|
|
7349
7347
|
stopPlay();
|
|
7350
7348
|
getVideoDetail(_prop.camera);
|
|
7351
7349
|
}
|
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.32";
|
|
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
|
});
|
|
@@ -6640,7 +6638,7 @@ class WebRtcMt$1 {
|
|
|
6640
6638
|
this.stopPlay();
|
|
6641
6639
|
setTimeout(() => {
|
|
6642
6640
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6643
|
-
this.p_player = false;
|
|
6641
|
+
this.p_player.value = false;
|
|
6644
6642
|
}, 5 * 1e3);
|
|
6645
6643
|
}
|
|
6646
6644
|
// 播放
|
|
@@ -7228,7 +7226,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7228
7226
|
props: props$7,
|
|
7229
7227
|
emits: ["changeStream"],
|
|
7230
7228
|
setup(_prop, _context) {
|
|
7231
|
-
|
|
7229
|
+
let play = reactive(null);
|
|
7232
7230
|
const uuid = _prop.domId;
|
|
7233
7231
|
const videoFull = id => {
|
|
7234
7232
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -7249,19 +7247,19 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7249
7247
|
};
|
|
7250
7248
|
const videoInfo2 = ref({});
|
|
7251
7249
|
const stopPlay = () => {
|
|
7252
|
-
if (play
|
|
7253
|
-
play.
|
|
7250
|
+
if (play) {
|
|
7251
|
+
play.stopPlay(`videoPlayer_${uuid}`);
|
|
7254
7252
|
}
|
|
7255
7253
|
};
|
|
7256
7254
|
const init = () => {
|
|
7257
|
-
play
|
|
7255
|
+
play = null;
|
|
7258
7256
|
let camera = videoInfo2.value;
|
|
7259
7257
|
camera = {
|
|
7260
7258
|
...camera,
|
|
7261
7259
|
..._prop.cameraConfig
|
|
7262
7260
|
};
|
|
7263
7261
|
let url = camera.webrtcTemplateMerged;
|
|
7264
|
-
play
|
|
7262
|
+
play = reactive(new WebRtcMt$1({
|
|
7265
7263
|
plays: {
|
|
7266
7264
|
videoElm: `videoPlayer_${uuid}`,
|
|
7267
7265
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -7273,7 +7271,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7273
7271
|
cameraStream: camera.streamType,
|
|
7274
7272
|
addRtspProxyUrl: url
|
|
7275
7273
|
}
|
|
7276
|
-
});
|
|
7274
|
+
}));
|
|
7277
7275
|
};
|
|
7278
7276
|
const releaseUrl = ref("");
|
|
7279
7277
|
const release = async () => {
|
|
@@ -7329,11 +7327,11 @@ const VideoPlayerV2 = defineComponent({
|
|
|
7329
7327
|
immediate: true,
|
|
7330
7328
|
deep: true
|
|
7331
7329
|
});
|
|
7332
|
-
watch(() => play
|
|
7330
|
+
watch(() => play?.p_player, nval => {
|
|
7333
7331
|
if (nval) {
|
|
7334
|
-
console.info("
|
|
7332
|
+
console.info("p_player ===> ", nval);
|
|
7335
7333
|
} else {
|
|
7336
|
-
console.log("
|
|
7334
|
+
console.log("p_player ===> add 500000000!");
|
|
7337
7335
|
stopPlay();
|
|
7338
7336
|
getVideoDetail(_prop.camera);
|
|
7339
7337
|
}
|
package/dist/video/index.cjs
CHANGED
|
@@ -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
|
});
|
|
@@ -5861,7 +5859,7 @@ class WebRtcMt$1 {
|
|
|
5861
5859
|
this.stopPlay();
|
|
5862
5860
|
setTimeout(() => {
|
|
5863
5861
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
5864
|
-
this.p_player = false;
|
|
5862
|
+
this.p_player.value = false;
|
|
5865
5863
|
}, 5 * 1e3);
|
|
5866
5864
|
}
|
|
5867
5865
|
// 播放
|
|
@@ -5951,7 +5949,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
5951
5949
|
props: props$1,
|
|
5952
5950
|
emits: ["changeStream"],
|
|
5953
5951
|
setup(_prop, _context) {
|
|
5954
|
-
|
|
5952
|
+
let play = vue.reactive(null);
|
|
5955
5953
|
const uuid = _prop.domId;
|
|
5956
5954
|
const videoFull = id => {
|
|
5957
5955
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -5972,19 +5970,19 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
5972
5970
|
};
|
|
5973
5971
|
const videoInfo2 = vue.ref({});
|
|
5974
5972
|
const stopPlay = () => {
|
|
5975
|
-
if (play
|
|
5976
|
-
play.
|
|
5973
|
+
if (play) {
|
|
5974
|
+
play.stopPlay(`videoPlayer_${uuid}`);
|
|
5977
5975
|
}
|
|
5978
5976
|
};
|
|
5979
5977
|
const init = () => {
|
|
5980
|
-
play
|
|
5978
|
+
play = null;
|
|
5981
5979
|
let camera = videoInfo2.value;
|
|
5982
5980
|
camera = {
|
|
5983
5981
|
...camera,
|
|
5984
5982
|
..._prop.cameraConfig
|
|
5985
5983
|
};
|
|
5986
5984
|
let url = camera.webrtcTemplateMerged;
|
|
5987
|
-
play
|
|
5985
|
+
play = vue.reactive(new WebRtcMt$1({
|
|
5988
5986
|
plays: {
|
|
5989
5987
|
videoElm: `videoPlayer_${uuid}`,
|
|
5990
5988
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -5996,7 +5994,7 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
5996
5994
|
cameraStream: camera.streamType,
|
|
5997
5995
|
addRtspProxyUrl: url
|
|
5998
5996
|
}
|
|
5999
|
-
});
|
|
5997
|
+
}));
|
|
6000
5998
|
};
|
|
6001
5999
|
const releaseUrl = vue.ref("");
|
|
6002
6000
|
const release = async () => {
|
|
@@ -6052,11 +6050,11 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6052
6050
|
immediate: true,
|
|
6053
6051
|
deep: true
|
|
6054
6052
|
});
|
|
6055
|
-
vue.watch(() => play
|
|
6053
|
+
vue.watch(() => play?.p_player, nval => {
|
|
6056
6054
|
if (nval) {
|
|
6057
|
-
console.info("
|
|
6055
|
+
console.info("p_player ===> ", nval);
|
|
6058
6056
|
} else {
|
|
6059
|
-
console.log("
|
|
6057
|
+
console.log("p_player ===> add 500000000!");
|
|
6060
6058
|
stopPlay();
|
|
6061
6059
|
getVideoDetail(_prop.camera);
|
|
6062
6060
|
}
|
package/dist/video/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
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
|
});
|
|
@@ -5853,7 +5851,7 @@ class WebRtcMt$1 {
|
|
|
5853
5851
|
this.stopPlay();
|
|
5854
5852
|
setTimeout(() => {
|
|
5855
5853
|
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
5856
|
-
this.p_player = false;
|
|
5854
|
+
this.p_player.value = false;
|
|
5857
5855
|
}, 5 * 1e3);
|
|
5858
5856
|
}
|
|
5859
5857
|
// 播放
|
|
@@ -5943,7 +5941,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
5943
5941
|
props: props$1,
|
|
5944
5942
|
emits: ["changeStream"],
|
|
5945
5943
|
setup(_prop, _context) {
|
|
5946
|
-
|
|
5944
|
+
let play = reactive(null);
|
|
5947
5945
|
const uuid = _prop.domId;
|
|
5948
5946
|
const videoFull = id => {
|
|
5949
5947
|
const elm = document.getElementById(`videoPlayer_${uuid}`);
|
|
@@ -5964,19 +5962,19 @@ const VideoPlayerV2 = defineComponent({
|
|
|
5964
5962
|
};
|
|
5965
5963
|
const videoInfo2 = ref({});
|
|
5966
5964
|
const stopPlay = () => {
|
|
5967
|
-
if (play
|
|
5968
|
-
play.
|
|
5965
|
+
if (play) {
|
|
5966
|
+
play.stopPlay(`videoPlayer_${uuid}`);
|
|
5969
5967
|
}
|
|
5970
5968
|
};
|
|
5971
5969
|
const init = () => {
|
|
5972
|
-
play
|
|
5970
|
+
play = null;
|
|
5973
5971
|
let camera = videoInfo2.value;
|
|
5974
5972
|
camera = {
|
|
5975
5973
|
...camera,
|
|
5976
5974
|
..._prop.cameraConfig
|
|
5977
5975
|
};
|
|
5978
5976
|
let url = camera.webrtcTemplateMerged;
|
|
5979
|
-
play
|
|
5977
|
+
play = reactive(new WebRtcMt$1({
|
|
5980
5978
|
plays: {
|
|
5981
5979
|
videoElm: `videoPlayer_${uuid}`,
|
|
5982
5980
|
mediaServerAddr: camera.mediaServerPo.url,
|
|
@@ -5988,7 +5986,7 @@ const VideoPlayerV2 = defineComponent({
|
|
|
5988
5986
|
cameraStream: camera.streamType,
|
|
5989
5987
|
addRtspProxyUrl: url
|
|
5990
5988
|
}
|
|
5991
|
-
});
|
|
5989
|
+
}));
|
|
5992
5990
|
};
|
|
5993
5991
|
const releaseUrl = ref("");
|
|
5994
5992
|
const release = async () => {
|
|
@@ -6044,11 +6042,11 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6044
6042
|
immediate: true,
|
|
6045
6043
|
deep: true
|
|
6046
6044
|
});
|
|
6047
|
-
watch(() => play
|
|
6045
|
+
watch(() => play?.p_player, nval => {
|
|
6048
6046
|
if (nval) {
|
|
6049
|
-
console.info("
|
|
6047
|
+
console.info("p_player ===> ", nval);
|
|
6050
6048
|
} else {
|
|
6051
|
-
console.log("
|
|
6049
|
+
console.log("p_player ===> add 500000000!");
|
|
6052
6050
|
stopPlay();
|
|
6053
6051
|
getVideoDetail(_prop.camera);
|
|
6054
6052
|
}
|