mtxt-ui3 0.0.37 → 0.0.38
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 +9 -61
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +9 -61
- package/dist/hooks/index.cjs +3 -53
- package/dist/hooks/index.js +3 -53
- package/dist/index.cjs +10 -62
- package/dist/index.d.ts +10 -1
- package/dist/index.js +10 -62
- package/dist/style.css +1 -1
- package/dist/utils/index.cjs +1 -3
- package/dist/utils/index.js +1 -3
- package/dist/video/index.cjs +2 -56
- package/dist/video/index.js +2 -56
- package/package.json +1 -1
|
@@ -281,9 +281,7 @@ async function fetchApi(url, method, parameter, dataType = "json", headers = {})
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
newUrl.value = isWithOrigin.value ? url2.href : url2.href.replace(location.origin, "");
|
|
284
|
-
} catch (e) {
|
|
285
|
-
console.log(e);
|
|
286
|
-
}
|
|
284
|
+
} catch (e) {}
|
|
287
285
|
};
|
|
288
286
|
if (method === "GET") {
|
|
289
287
|
if (parameter) {
|
|
@@ -797,8 +795,6 @@ const Events$1 = {
|
|
|
797
795
|
WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
|
|
798
796
|
CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
|
|
799
797
|
};
|
|
800
|
-
const VERSION$1 = "1.0.1";
|
|
801
|
-
const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
|
|
802
798
|
function isFirefox() {
|
|
803
799
|
return window.navigator.userAgent.match("Firefox") !== null;
|
|
804
800
|
}
|
|
@@ -828,7 +824,6 @@ class Resolution {
|
|
|
828
824
|
}
|
|
829
825
|
}
|
|
830
826
|
let logDisabled_ = true;
|
|
831
|
-
let deprecationWarnings_ = true;
|
|
832
827
|
function extractVersion(uastring, expr, pos) {
|
|
833
828
|
const match = uastring.match(expr);
|
|
834
829
|
return match && match.length >= pos && parseInt(match[pos], 10);
|
|
@@ -906,7 +901,6 @@ function disableWarnings(bool) {
|
|
|
906
901
|
if (typeof bool !== "boolean") {
|
|
907
902
|
return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
|
|
908
903
|
}
|
|
909
|
-
deprecationWarnings_ = !bool;
|
|
910
904
|
return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
|
|
911
905
|
}
|
|
912
906
|
function log$1() {
|
|
@@ -914,17 +908,8 @@ function log$1() {
|
|
|
914
908
|
if (logDisabled_) {
|
|
915
909
|
return;
|
|
916
910
|
}
|
|
917
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
918
|
-
console.log.apply(console, arguments);
|
|
919
|
-
}
|
|
920
911
|
}
|
|
921
912
|
}
|
|
922
|
-
function deprecated(oldMethod, newMethod) {
|
|
923
|
-
if (!deprecationWarnings_) {
|
|
924
|
-
return;
|
|
925
|
-
}
|
|
926
|
-
console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
|
|
927
|
-
}
|
|
928
913
|
function detectBrowser(window2) {
|
|
929
914
|
const result = {
|
|
930
915
|
browser: null,
|
|
@@ -1183,7 +1168,6 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
|
|
|
1183
1168
|
return;
|
|
1184
1169
|
}
|
|
1185
1170
|
if (typeof getSourceId !== "function") {
|
|
1186
|
-
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
1187
1171
|
return;
|
|
1188
1172
|
}
|
|
1189
1173
|
window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
|
|
@@ -1769,9 +1753,7 @@ function filterIceServers$1(iceServers, edgeVersion) {
|
|
|
1769
1753
|
return iceServers.filter(server => {
|
|
1770
1754
|
if (server && (server.urls || server.url)) {
|
|
1771
1755
|
let urls = server.urls || server.url;
|
|
1772
|
-
if (server.url && !server.urls)
|
|
1773
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
1774
|
-
}
|
|
1756
|
+
if (server.url && !server.urls) ;
|
|
1775
1757
|
const isString2 = typeof urls === "string";
|
|
1776
1758
|
if (isString2) {
|
|
1777
1759
|
urls = [urls];
|
|
@@ -2443,9 +2425,7 @@ function filterIceServers(iceServers, edgeVersion) {
|
|
|
2443
2425
|
return iceServers.filter(function (server) {
|
|
2444
2426
|
if (server && (server.urls || server.url)) {
|
|
2445
2427
|
var urls = server.urls || server.url;
|
|
2446
|
-
if (server.url && !server.urls)
|
|
2447
|
-
console.warn("RTCIceServer.url is deprecated! Use urls instead.");
|
|
2448
|
-
}
|
|
2428
|
+
if (server.url && !server.urls) ;
|
|
2449
2429
|
var isString2 = typeof urls === "string";
|
|
2450
2430
|
if (isString2) {
|
|
2451
2431
|
urls = [urls];
|
|
@@ -3304,7 +3284,6 @@ var rtcpeerconnection = function (window2, edgeVersion) {
|
|
|
3304
3284
|
}
|
|
3305
3285
|
pc.transceivers.forEach(function (transceiver) {
|
|
3306
3286
|
if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
|
|
3307
|
-
console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
|
|
3308
3287
|
transceiver.iceTransport.addRemoteCandidate({});
|
|
3309
3288
|
}
|
|
3310
3289
|
});
|
|
@@ -3887,7 +3866,6 @@ function shimGetUserMedia$1(window2, browserDetails) {
|
|
|
3887
3866
|
const navigator2 = window2 && window2.navigator;
|
|
3888
3867
|
const MediaStreamTrack = window2 && window2.MediaStreamTrack;
|
|
3889
3868
|
navigator2.getUserMedia = function (constraints, onSuccess, onError) {
|
|
3890
|
-
deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
|
|
3891
3869
|
navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
|
|
3892
3870
|
};
|
|
3893
3871
|
if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
|
|
@@ -4068,7 +4046,6 @@ function shimRemoveStream(window2) {
|
|
|
4068
4046
|
return;
|
|
4069
4047
|
}
|
|
4070
4048
|
window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
|
|
4071
|
-
deprecated("removeStream", "removeTrack");
|
|
4072
4049
|
this.getSenders().forEach(sender => {
|
|
4073
4050
|
if (sender.track && stream.getTracks().includes(sender.track)) {
|
|
4074
4051
|
this.removeTrack(sender);
|
|
@@ -4400,7 +4377,6 @@ function shimRTCIceServerUrls(window2) {
|
|
|
4400
4377
|
for (let i = 0; i < pcConfig.iceServers.length; i++) {
|
|
4401
4378
|
let server = pcConfig.iceServers[i];
|
|
4402
4379
|
if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
|
|
4403
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
4404
4380
|
server = JSON.parse(JSON.stringify(server));
|
|
4405
4381
|
server.urls = server.url;
|
|
4406
4382
|
delete server.url;
|
|
@@ -4780,7 +4756,6 @@ function adapterFactory({
|
|
|
4780
4756
|
shimEdge: true,
|
|
4781
4757
|
shimSafari: true
|
|
4782
4758
|
}) {
|
|
4783
|
-
const logging2 = log$1;
|
|
4784
4759
|
const browserDetails = detectBrowser(window2);
|
|
4785
4760
|
const adapter = {
|
|
4786
4761
|
browserDetails,
|
|
@@ -4792,14 +4767,11 @@ function adapterFactory({
|
|
|
4792
4767
|
switch (browserDetails.browser) {
|
|
4793
4768
|
case "chrome":
|
|
4794
4769
|
if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
|
|
4795
|
-
logging2("Chrome shim is not included in this adapter release.");
|
|
4796
4770
|
return adapter;
|
|
4797
4771
|
}
|
|
4798
4772
|
if (browserDetails.version === null) {
|
|
4799
|
-
logging2("Chrome shim can not determine version, not shimming.");
|
|
4800
4773
|
return adapter;
|
|
4801
4774
|
}
|
|
4802
|
-
logging2("adapter.js shimming chrome.");
|
|
4803
4775
|
adapter.browserShim = chromeShim;
|
|
4804
4776
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4805
4777
|
shimGetUserMedia$3(window2, browserDetails);
|
|
@@ -4819,10 +4791,8 @@ function adapterFactory({
|
|
|
4819
4791
|
break;
|
|
4820
4792
|
case "firefox":
|
|
4821
4793
|
if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
|
|
4822
|
-
logging2("Firefox shim is not included in this adapter release.");
|
|
4823
4794
|
return adapter;
|
|
4824
4795
|
}
|
|
4825
|
-
logging2("adapter.js shimming firefox.");
|
|
4826
4796
|
adapter.browserShim = firefoxShim;
|
|
4827
4797
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4828
4798
|
shimGetUserMedia$1(window2, browserDetails);
|
|
@@ -4843,10 +4813,8 @@ function adapterFactory({
|
|
|
4843
4813
|
break;
|
|
4844
4814
|
case "edge":
|
|
4845
4815
|
if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
|
|
4846
|
-
logging2("MS edge shim is not included in this adapter release.");
|
|
4847
4816
|
return adapter;
|
|
4848
4817
|
}
|
|
4849
|
-
logging2("adapter.js shimming edge.");
|
|
4850
4818
|
adapter.browserShim = edgeShim;
|
|
4851
4819
|
shimGetUserMedia$2(window2);
|
|
4852
4820
|
shimGetDisplayMedia$1(window2);
|
|
@@ -4857,10 +4825,8 @@ function adapterFactory({
|
|
|
4857
4825
|
break;
|
|
4858
4826
|
case "safari":
|
|
4859
4827
|
if (!safariShim || !options.shimSafari) {
|
|
4860
|
-
logging2("Safari shim is not included in this adapter release.");
|
|
4861
4828
|
return adapter;
|
|
4862
4829
|
}
|
|
4863
|
-
logging2("adapter.js shimming safari.");
|
|
4864
4830
|
adapter.browserShim = safariShim;
|
|
4865
4831
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4866
4832
|
shimRTCIceServerUrls(window2);
|
|
@@ -4876,9 +4842,6 @@ function adapterFactory({
|
|
|
4876
4842
|
shimSendThrowTypeError(window2);
|
|
4877
4843
|
removeExtmapAllowMixed(window2, browserDetails);
|
|
4878
4844
|
break;
|
|
4879
|
-
default:
|
|
4880
|
-
logging2("Unsupported browser!");
|
|
4881
|
-
break;
|
|
4882
4845
|
}
|
|
4883
4846
|
return adapter;
|
|
4884
4847
|
}
|
|
@@ -5957,7 +5920,6 @@ validators$1.transitional = function transitional2(validator2, version, message)
|
|
|
5957
5920
|
}
|
|
5958
5921
|
if (version && !deprecatedWarnings[opt]) {
|
|
5959
5922
|
deprecatedWarnings[opt] = true;
|
|
5960
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
5961
5923
|
}
|
|
5962
5924
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
5963
5925
|
};
|
|
@@ -6489,8 +6451,6 @@ class RTCEndpoint extends Event$1 {
|
|
|
6489
6451
|
return this._localStream;
|
|
6490
6452
|
}
|
|
6491
6453
|
}
|
|
6492
|
-
console.log("build date:", BUILD_DATE);
|
|
6493
|
-
console.log("version:", VERSION$1);
|
|
6494
6454
|
const Events = Events$1;
|
|
6495
6455
|
const Endpoint = RTCEndpoint;
|
|
6496
6456
|
|
|
@@ -6560,12 +6520,10 @@ class WebRtcMt$1 {
|
|
|
6560
6520
|
this.startPlay(plays);
|
|
6561
6521
|
resolve(res);
|
|
6562
6522
|
} else {
|
|
6563
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6564
6523
|
reject("error");
|
|
6565
6524
|
}
|
|
6566
6525
|
});
|
|
6567
6526
|
}).catch(err => {
|
|
6568
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6569
6527
|
reject("error");
|
|
6570
6528
|
});
|
|
6571
6529
|
});
|
|
@@ -6574,11 +6532,6 @@ class WebRtcMt$1 {
|
|
|
6574
6532
|
switch (type) {
|
|
6575
6533
|
case "err":
|
|
6576
6534
|
throw new Error(text);
|
|
6577
|
-
case "warn":
|
|
6578
|
-
console.log(text);
|
|
6579
|
-
break;
|
|
6580
|
-
default:
|
|
6581
|
-
console.log(text);
|
|
6582
6535
|
}
|
|
6583
6536
|
}
|
|
6584
6537
|
// 停止播放0
|
|
@@ -6622,7 +6575,6 @@ class WebRtcMt$1 {
|
|
|
6622
6575
|
this.rePlay(videoElm);
|
|
6623
6576
|
});
|
|
6624
6577
|
player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
|
|
6625
|
-
console.log("webrtc:" + state);
|
|
6626
6578
|
if (state === "disconnected" || state === "failed") {
|
|
6627
6579
|
this.rePlay(videoElm);
|
|
6628
6580
|
}
|
|
@@ -6630,11 +6582,9 @@ class WebRtcMt$1 {
|
|
|
6630
6582
|
}
|
|
6631
6583
|
// 重播
|
|
6632
6584
|
rePlay(videoElm) {
|
|
6633
|
-
console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
|
|
6634
6585
|
this.stopPlay();
|
|
6635
6586
|
setTimeout(() => {
|
|
6636
6587
|
this.p_player.value = "error";
|
|
6637
|
-
console.log("\u5E95\u90E8\u91CD\u64AD", this.p_player.value);
|
|
6638
6588
|
}, 3 * 1e3);
|
|
6639
6589
|
}
|
|
6640
6590
|
// 播放
|
|
@@ -6761,7 +6711,6 @@ const VideoPlayerV2 = vue.defineComponent({
|
|
|
6761
6711
|
vue.watchEffect(() => {
|
|
6762
6712
|
if (playerRef.value) {
|
|
6763
6713
|
if (playerRef.value.value === "error") {
|
|
6764
|
-
console.log("p_player ===> add 500");
|
|
6765
6714
|
stopPlay();
|
|
6766
6715
|
getVideoDetail(_prop.camera);
|
|
6767
6716
|
}
|
|
@@ -6930,11 +6879,6 @@ class WebRtcMt {
|
|
|
6930
6879
|
switch (type) {
|
|
6931
6880
|
case "err":
|
|
6932
6881
|
throw new Error(text);
|
|
6933
|
-
case "warn":
|
|
6934
|
-
console.warn(text);
|
|
6935
|
-
break;
|
|
6936
|
-
default:
|
|
6937
|
-
console.info(text);
|
|
6938
6882
|
}
|
|
6939
6883
|
}
|
|
6940
6884
|
// 停止播放0
|
|
@@ -8764,6 +8708,10 @@ const ParamManagerV2 = vue.defineComponent({
|
|
|
8764
8708
|
hideEdit: {
|
|
8765
8709
|
type: Boolean,
|
|
8766
8710
|
default: false
|
|
8711
|
+
},
|
|
8712
|
+
dark: {
|
|
8713
|
+
type: Boolean,
|
|
8714
|
+
default: false
|
|
8767
8715
|
}
|
|
8768
8716
|
},
|
|
8769
8717
|
setup(props, {
|
|
@@ -8823,8 +8771,8 @@ const ParamManagerV2 = vue.defineComponent({
|
|
|
8823
8771
|
return () => {
|
|
8824
8772
|
let _slot, _slot2;
|
|
8825
8773
|
return vue.createVNode("div", {
|
|
8826
|
-
"class": config.prefix + "-param-manager-v2"
|
|
8827
|
-
}, [vue.createVNode("div", {
|
|
8774
|
+
"class": [config.prefix + "-param-manager-v2", props.dark && "dark"]
|
|
8775
|
+
}, [menuList.value.length > 1 && vue.createVNode("div", {
|
|
8828
8776
|
"class": "menu"
|
|
8829
8777
|
}, [vue.createVNode(vue.resolveComponent("a-menu"), {
|
|
8830
8778
|
"mode": "inline",
|
|
@@ -419,6 +419,10 @@ declare const ParamManagerV2: vue.DefineComponent<{
|
|
|
419
419
|
type: BooleanConstructor;
|
|
420
420
|
default: boolean;
|
|
421
421
|
};
|
|
422
|
+
dark: {
|
|
423
|
+
type: BooleanConstructor;
|
|
424
|
+
default: boolean;
|
|
425
|
+
};
|
|
422
426
|
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("tabChange" | "editChange" | "save" | "menuChange")[], "tabChange" | "editChange" | "save" | "menuChange", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
423
427
|
defaultEdit: {
|
|
424
428
|
type: BooleanConstructor;
|
|
@@ -432,6 +436,10 @@ declare const ParamManagerV2: vue.DefineComponent<{
|
|
|
432
436
|
type: BooleanConstructor;
|
|
433
437
|
default: boolean;
|
|
434
438
|
};
|
|
439
|
+
dark: {
|
|
440
|
+
type: BooleanConstructor;
|
|
441
|
+
default: boolean;
|
|
442
|
+
};
|
|
435
443
|
}>> & {
|
|
436
444
|
onTabChange?: ((...args: any[]) => any) | undefined;
|
|
437
445
|
onEditChange?: ((...args: any[]) => any) | undefined;
|
|
@@ -440,6 +448,7 @@ declare const ParamManagerV2: vue.DefineComponent<{
|
|
|
440
448
|
}, {
|
|
441
449
|
defaultEdit: boolean;
|
|
442
450
|
hideEdit: boolean;
|
|
451
|
+
dark: boolean;
|
|
443
452
|
}, {}>;
|
|
444
453
|
|
|
445
454
|
/**
|
package/dist/components/index.js
CHANGED
|
@@ -271,9 +271,7 @@ async function fetchApi(url, method, parameter, dataType = "json", headers = {})
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
newUrl.value = isWithOrigin.value ? url2.href : url2.href.replace(location.origin, "");
|
|
274
|
-
} catch (e) {
|
|
275
|
-
console.log(e);
|
|
276
|
-
}
|
|
274
|
+
} catch (e) {}
|
|
277
275
|
};
|
|
278
276
|
if (method === "GET") {
|
|
279
277
|
if (parameter) {
|
|
@@ -787,8 +785,6 @@ const Events$1 = {
|
|
|
787
785
|
WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
|
|
788
786
|
CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
|
|
789
787
|
};
|
|
790
|
-
const VERSION$1 = "1.0.1";
|
|
791
|
-
const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
|
|
792
788
|
function isFirefox() {
|
|
793
789
|
return window.navigator.userAgent.match("Firefox") !== null;
|
|
794
790
|
}
|
|
@@ -818,7 +814,6 @@ class Resolution {
|
|
|
818
814
|
}
|
|
819
815
|
}
|
|
820
816
|
let logDisabled_ = true;
|
|
821
|
-
let deprecationWarnings_ = true;
|
|
822
817
|
function extractVersion(uastring, expr, pos) {
|
|
823
818
|
const match = uastring.match(expr);
|
|
824
819
|
return match && match.length >= pos && parseInt(match[pos], 10);
|
|
@@ -896,7 +891,6 @@ function disableWarnings(bool) {
|
|
|
896
891
|
if (typeof bool !== "boolean") {
|
|
897
892
|
return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
|
|
898
893
|
}
|
|
899
|
-
deprecationWarnings_ = !bool;
|
|
900
894
|
return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
|
|
901
895
|
}
|
|
902
896
|
function log$1() {
|
|
@@ -904,17 +898,8 @@ function log$1() {
|
|
|
904
898
|
if (logDisabled_) {
|
|
905
899
|
return;
|
|
906
900
|
}
|
|
907
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
908
|
-
console.log.apply(console, arguments);
|
|
909
|
-
}
|
|
910
901
|
}
|
|
911
902
|
}
|
|
912
|
-
function deprecated(oldMethod, newMethod) {
|
|
913
|
-
if (!deprecationWarnings_) {
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
|
|
917
|
-
}
|
|
918
903
|
function detectBrowser(window2) {
|
|
919
904
|
const result = {
|
|
920
905
|
browser: null,
|
|
@@ -1173,7 +1158,6 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
|
|
|
1173
1158
|
return;
|
|
1174
1159
|
}
|
|
1175
1160
|
if (typeof getSourceId !== "function") {
|
|
1176
|
-
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
1177
1161
|
return;
|
|
1178
1162
|
}
|
|
1179
1163
|
window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
|
|
@@ -1759,9 +1743,7 @@ function filterIceServers$1(iceServers, edgeVersion) {
|
|
|
1759
1743
|
return iceServers.filter(server => {
|
|
1760
1744
|
if (server && (server.urls || server.url)) {
|
|
1761
1745
|
let urls = server.urls || server.url;
|
|
1762
|
-
if (server.url && !server.urls)
|
|
1763
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
1764
|
-
}
|
|
1746
|
+
if (server.url && !server.urls) ;
|
|
1765
1747
|
const isString2 = typeof urls === "string";
|
|
1766
1748
|
if (isString2) {
|
|
1767
1749
|
urls = [urls];
|
|
@@ -2433,9 +2415,7 @@ function filterIceServers(iceServers, edgeVersion) {
|
|
|
2433
2415
|
return iceServers.filter(function (server) {
|
|
2434
2416
|
if (server && (server.urls || server.url)) {
|
|
2435
2417
|
var urls = server.urls || server.url;
|
|
2436
|
-
if (server.url && !server.urls)
|
|
2437
|
-
console.warn("RTCIceServer.url is deprecated! Use urls instead.");
|
|
2438
|
-
}
|
|
2418
|
+
if (server.url && !server.urls) ;
|
|
2439
2419
|
var isString2 = typeof urls === "string";
|
|
2440
2420
|
if (isString2) {
|
|
2441
2421
|
urls = [urls];
|
|
@@ -3294,7 +3274,6 @@ var rtcpeerconnection = function (window2, edgeVersion) {
|
|
|
3294
3274
|
}
|
|
3295
3275
|
pc.transceivers.forEach(function (transceiver) {
|
|
3296
3276
|
if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
|
|
3297
|
-
console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
|
|
3298
3277
|
transceiver.iceTransport.addRemoteCandidate({});
|
|
3299
3278
|
}
|
|
3300
3279
|
});
|
|
@@ -3877,7 +3856,6 @@ function shimGetUserMedia$1(window2, browserDetails) {
|
|
|
3877
3856
|
const navigator2 = window2 && window2.navigator;
|
|
3878
3857
|
const MediaStreamTrack = window2 && window2.MediaStreamTrack;
|
|
3879
3858
|
navigator2.getUserMedia = function (constraints, onSuccess, onError) {
|
|
3880
|
-
deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
|
|
3881
3859
|
navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
|
|
3882
3860
|
};
|
|
3883
3861
|
if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
|
|
@@ -4058,7 +4036,6 @@ function shimRemoveStream(window2) {
|
|
|
4058
4036
|
return;
|
|
4059
4037
|
}
|
|
4060
4038
|
window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
|
|
4061
|
-
deprecated("removeStream", "removeTrack");
|
|
4062
4039
|
this.getSenders().forEach(sender => {
|
|
4063
4040
|
if (sender.track && stream.getTracks().includes(sender.track)) {
|
|
4064
4041
|
this.removeTrack(sender);
|
|
@@ -4390,7 +4367,6 @@ function shimRTCIceServerUrls(window2) {
|
|
|
4390
4367
|
for (let i = 0; i < pcConfig.iceServers.length; i++) {
|
|
4391
4368
|
let server = pcConfig.iceServers[i];
|
|
4392
4369
|
if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
|
|
4393
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
4394
4370
|
server = JSON.parse(JSON.stringify(server));
|
|
4395
4371
|
server.urls = server.url;
|
|
4396
4372
|
delete server.url;
|
|
@@ -4770,7 +4746,6 @@ function adapterFactory({
|
|
|
4770
4746
|
shimEdge: true,
|
|
4771
4747
|
shimSafari: true
|
|
4772
4748
|
}) {
|
|
4773
|
-
const logging2 = log$1;
|
|
4774
4749
|
const browserDetails = detectBrowser(window2);
|
|
4775
4750
|
const adapter = {
|
|
4776
4751
|
browserDetails,
|
|
@@ -4782,14 +4757,11 @@ function adapterFactory({
|
|
|
4782
4757
|
switch (browserDetails.browser) {
|
|
4783
4758
|
case "chrome":
|
|
4784
4759
|
if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
|
|
4785
|
-
logging2("Chrome shim is not included in this adapter release.");
|
|
4786
4760
|
return adapter;
|
|
4787
4761
|
}
|
|
4788
4762
|
if (browserDetails.version === null) {
|
|
4789
|
-
logging2("Chrome shim can not determine version, not shimming.");
|
|
4790
4763
|
return adapter;
|
|
4791
4764
|
}
|
|
4792
|
-
logging2("adapter.js shimming chrome.");
|
|
4793
4765
|
adapter.browserShim = chromeShim;
|
|
4794
4766
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4795
4767
|
shimGetUserMedia$3(window2, browserDetails);
|
|
@@ -4809,10 +4781,8 @@ function adapterFactory({
|
|
|
4809
4781
|
break;
|
|
4810
4782
|
case "firefox":
|
|
4811
4783
|
if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
|
|
4812
|
-
logging2("Firefox shim is not included in this adapter release.");
|
|
4813
4784
|
return adapter;
|
|
4814
4785
|
}
|
|
4815
|
-
logging2("adapter.js shimming firefox.");
|
|
4816
4786
|
adapter.browserShim = firefoxShim;
|
|
4817
4787
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4818
4788
|
shimGetUserMedia$1(window2, browserDetails);
|
|
@@ -4833,10 +4803,8 @@ function adapterFactory({
|
|
|
4833
4803
|
break;
|
|
4834
4804
|
case "edge":
|
|
4835
4805
|
if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
|
|
4836
|
-
logging2("MS edge shim is not included in this adapter release.");
|
|
4837
4806
|
return adapter;
|
|
4838
4807
|
}
|
|
4839
|
-
logging2("adapter.js shimming edge.");
|
|
4840
4808
|
adapter.browserShim = edgeShim;
|
|
4841
4809
|
shimGetUserMedia$2(window2);
|
|
4842
4810
|
shimGetDisplayMedia$1(window2);
|
|
@@ -4847,10 +4815,8 @@ function adapterFactory({
|
|
|
4847
4815
|
break;
|
|
4848
4816
|
case "safari":
|
|
4849
4817
|
if (!safariShim || !options.shimSafari) {
|
|
4850
|
-
logging2("Safari shim is not included in this adapter release.");
|
|
4851
4818
|
return adapter;
|
|
4852
4819
|
}
|
|
4853
|
-
logging2("adapter.js shimming safari.");
|
|
4854
4820
|
adapter.browserShim = safariShim;
|
|
4855
4821
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4856
4822
|
shimRTCIceServerUrls(window2);
|
|
@@ -4866,9 +4832,6 @@ function adapterFactory({
|
|
|
4866
4832
|
shimSendThrowTypeError(window2);
|
|
4867
4833
|
removeExtmapAllowMixed(window2, browserDetails);
|
|
4868
4834
|
break;
|
|
4869
|
-
default:
|
|
4870
|
-
logging2("Unsupported browser!");
|
|
4871
|
-
break;
|
|
4872
4835
|
}
|
|
4873
4836
|
return adapter;
|
|
4874
4837
|
}
|
|
@@ -5947,7 +5910,6 @@ validators$1.transitional = function transitional2(validator2, version, message)
|
|
|
5947
5910
|
}
|
|
5948
5911
|
if (version && !deprecatedWarnings[opt]) {
|
|
5949
5912
|
deprecatedWarnings[opt] = true;
|
|
5950
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
5951
5913
|
}
|
|
5952
5914
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
5953
5915
|
};
|
|
@@ -6479,8 +6441,6 @@ class RTCEndpoint extends Event$1 {
|
|
|
6479
6441
|
return this._localStream;
|
|
6480
6442
|
}
|
|
6481
6443
|
}
|
|
6482
|
-
console.log("build date:", BUILD_DATE);
|
|
6483
|
-
console.log("version:", VERSION$1);
|
|
6484
6444
|
const Events = Events$1;
|
|
6485
6445
|
const Endpoint = RTCEndpoint;
|
|
6486
6446
|
|
|
@@ -6550,12 +6510,10 @@ class WebRtcMt$1 {
|
|
|
6550
6510
|
this.startPlay(plays);
|
|
6551
6511
|
resolve(res);
|
|
6552
6512
|
} else {
|
|
6553
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6554
6513
|
reject("error");
|
|
6555
6514
|
}
|
|
6556
6515
|
});
|
|
6557
6516
|
}).catch(err => {
|
|
6558
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6559
6517
|
reject("error");
|
|
6560
6518
|
});
|
|
6561
6519
|
});
|
|
@@ -6564,11 +6522,6 @@ class WebRtcMt$1 {
|
|
|
6564
6522
|
switch (type) {
|
|
6565
6523
|
case "err":
|
|
6566
6524
|
throw new Error(text);
|
|
6567
|
-
case "warn":
|
|
6568
|
-
console.log(text);
|
|
6569
|
-
break;
|
|
6570
|
-
default:
|
|
6571
|
-
console.log(text);
|
|
6572
6525
|
}
|
|
6573
6526
|
}
|
|
6574
6527
|
// 停止播放0
|
|
@@ -6612,7 +6565,6 @@ class WebRtcMt$1 {
|
|
|
6612
6565
|
this.rePlay(videoElm);
|
|
6613
6566
|
});
|
|
6614
6567
|
player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
|
|
6615
|
-
console.log("webrtc:" + state);
|
|
6616
6568
|
if (state === "disconnected" || state === "failed") {
|
|
6617
6569
|
this.rePlay(videoElm);
|
|
6618
6570
|
}
|
|
@@ -6620,11 +6572,9 @@ class WebRtcMt$1 {
|
|
|
6620
6572
|
}
|
|
6621
6573
|
// 重播
|
|
6622
6574
|
rePlay(videoElm) {
|
|
6623
|
-
console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
|
|
6624
6575
|
this.stopPlay();
|
|
6625
6576
|
setTimeout(() => {
|
|
6626
6577
|
this.p_player.value = "error";
|
|
6627
|
-
console.log("\u5E95\u90E8\u91CD\u64AD", this.p_player.value);
|
|
6628
6578
|
}, 3 * 1e3);
|
|
6629
6579
|
}
|
|
6630
6580
|
// 播放
|
|
@@ -6751,7 +6701,6 @@ const VideoPlayerV2 = defineComponent({
|
|
|
6751
6701
|
watchEffect(() => {
|
|
6752
6702
|
if (playerRef.value) {
|
|
6753
6703
|
if (playerRef.value.value === "error") {
|
|
6754
|
-
console.log("p_player ===> add 500");
|
|
6755
6704
|
stopPlay();
|
|
6756
6705
|
getVideoDetail(_prop.camera);
|
|
6757
6706
|
}
|
|
@@ -6920,11 +6869,6 @@ class WebRtcMt {
|
|
|
6920
6869
|
switch (type) {
|
|
6921
6870
|
case "err":
|
|
6922
6871
|
throw new Error(text);
|
|
6923
|
-
case "warn":
|
|
6924
|
-
console.warn(text);
|
|
6925
|
-
break;
|
|
6926
|
-
default:
|
|
6927
|
-
console.info(text);
|
|
6928
6872
|
}
|
|
6929
6873
|
}
|
|
6930
6874
|
// 停止播放0
|
|
@@ -8754,6 +8698,10 @@ const ParamManagerV2 = defineComponent({
|
|
|
8754
8698
|
hideEdit: {
|
|
8755
8699
|
type: Boolean,
|
|
8756
8700
|
default: false
|
|
8701
|
+
},
|
|
8702
|
+
dark: {
|
|
8703
|
+
type: Boolean,
|
|
8704
|
+
default: false
|
|
8757
8705
|
}
|
|
8758
8706
|
},
|
|
8759
8707
|
setup(props, {
|
|
@@ -8813,8 +8761,8 @@ const ParamManagerV2 = defineComponent({
|
|
|
8813
8761
|
return () => {
|
|
8814
8762
|
let _slot, _slot2;
|
|
8815
8763
|
return createVNode("div", {
|
|
8816
|
-
"class": config.prefix + "-param-manager-v2"
|
|
8817
|
-
}, [createVNode("div", {
|
|
8764
|
+
"class": [config.prefix + "-param-manager-v2", props.dark && "dark"]
|
|
8765
|
+
}, [menuList.value.length > 1 && createVNode("div", {
|
|
8818
8766
|
"class": "menu"
|
|
8819
8767
|
}, [createVNode(resolveComponent("a-menu"), {
|
|
8820
8768
|
"mode": "inline",
|