mtxt-ui3 0.0.37 → 0.0.39
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
package/dist/hooks/index.cjs
CHANGED
|
@@ -167,8 +167,6 @@ const Events$1 = {
|
|
|
167
167
|
WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
|
|
168
168
|
CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
|
|
169
169
|
};
|
|
170
|
-
const VERSION$1 = "1.0.1";
|
|
171
|
-
const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
|
|
172
170
|
function isFirefox() {
|
|
173
171
|
return window.navigator.userAgent.match("Firefox") !== null;
|
|
174
172
|
}
|
|
@@ -198,7 +196,6 @@ class Resolution {
|
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
let logDisabled_ = true;
|
|
201
|
-
let deprecationWarnings_ = true;
|
|
202
199
|
function extractVersion(uastring, expr, pos) {
|
|
203
200
|
const match = uastring.match(expr);
|
|
204
201
|
return match && match.length >= pos && parseInt(match[pos], 10);
|
|
@@ -276,7 +273,6 @@ function disableWarnings(bool) {
|
|
|
276
273
|
if (typeof bool !== "boolean") {
|
|
277
274
|
return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
|
|
278
275
|
}
|
|
279
|
-
deprecationWarnings_ = !bool;
|
|
280
276
|
return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
|
|
281
277
|
}
|
|
282
278
|
function log$1() {
|
|
@@ -284,16 +280,7 @@ function log$1() {
|
|
|
284
280
|
if (logDisabled_) {
|
|
285
281
|
return;
|
|
286
282
|
}
|
|
287
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
288
|
-
console.log.apply(console, arguments);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
function deprecated(oldMethod, newMethod) {
|
|
293
|
-
if (!deprecationWarnings_) {
|
|
294
|
-
return;
|
|
295
283
|
}
|
|
296
|
-
console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
|
|
297
284
|
}
|
|
298
285
|
function detectBrowser(window2) {
|
|
299
286
|
const result = {
|
|
@@ -553,7 +540,6 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
|
|
|
553
540
|
return;
|
|
554
541
|
}
|
|
555
542
|
if (typeof getSourceId !== "function") {
|
|
556
|
-
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
557
543
|
return;
|
|
558
544
|
}
|
|
559
545
|
window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
|
|
@@ -1139,9 +1125,7 @@ function filterIceServers$1(iceServers, edgeVersion) {
|
|
|
1139
1125
|
return iceServers.filter(server => {
|
|
1140
1126
|
if (server && (server.urls || server.url)) {
|
|
1141
1127
|
let urls = server.urls || server.url;
|
|
1142
|
-
if (server.url && !server.urls)
|
|
1143
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
1144
|
-
}
|
|
1128
|
+
if (server.url && !server.urls) ;
|
|
1145
1129
|
const isString2 = typeof urls === "string";
|
|
1146
1130
|
if (isString2) {
|
|
1147
1131
|
urls = [urls];
|
|
@@ -1813,9 +1797,7 @@ function filterIceServers(iceServers, edgeVersion) {
|
|
|
1813
1797
|
return iceServers.filter(function (server) {
|
|
1814
1798
|
if (server && (server.urls || server.url)) {
|
|
1815
1799
|
var urls = server.urls || server.url;
|
|
1816
|
-
if (server.url && !server.urls)
|
|
1817
|
-
console.warn("RTCIceServer.url is deprecated! Use urls instead.");
|
|
1818
|
-
}
|
|
1800
|
+
if (server.url && !server.urls) ;
|
|
1819
1801
|
var isString2 = typeof urls === "string";
|
|
1820
1802
|
if (isString2) {
|
|
1821
1803
|
urls = [urls];
|
|
@@ -2674,7 +2656,6 @@ var rtcpeerconnection = function (window2, edgeVersion) {
|
|
|
2674
2656
|
}
|
|
2675
2657
|
pc.transceivers.forEach(function (transceiver) {
|
|
2676
2658
|
if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
|
|
2677
|
-
console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
|
|
2678
2659
|
transceiver.iceTransport.addRemoteCandidate({});
|
|
2679
2660
|
}
|
|
2680
2661
|
});
|
|
@@ -3257,7 +3238,6 @@ function shimGetUserMedia$1(window2, browserDetails) {
|
|
|
3257
3238
|
const navigator2 = window2 && window2.navigator;
|
|
3258
3239
|
const MediaStreamTrack = window2 && window2.MediaStreamTrack;
|
|
3259
3240
|
navigator2.getUserMedia = function (constraints, onSuccess, onError) {
|
|
3260
|
-
deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
|
|
3261
3241
|
navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
|
|
3262
3242
|
};
|
|
3263
3243
|
if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
|
|
@@ -3438,7 +3418,6 @@ function shimRemoveStream(window2) {
|
|
|
3438
3418
|
return;
|
|
3439
3419
|
}
|
|
3440
3420
|
window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
|
|
3441
|
-
deprecated("removeStream", "removeTrack");
|
|
3442
3421
|
this.getSenders().forEach(sender => {
|
|
3443
3422
|
if (sender.track && stream.getTracks().includes(sender.track)) {
|
|
3444
3423
|
this.removeTrack(sender);
|
|
@@ -3770,7 +3749,6 @@ function shimRTCIceServerUrls(window2) {
|
|
|
3770
3749
|
for (let i = 0; i < pcConfig.iceServers.length; i++) {
|
|
3771
3750
|
let server = pcConfig.iceServers[i];
|
|
3772
3751
|
if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
|
|
3773
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
3774
3752
|
server = JSON.parse(JSON.stringify(server));
|
|
3775
3753
|
server.urls = server.url;
|
|
3776
3754
|
delete server.url;
|
|
@@ -4150,7 +4128,6 @@ function adapterFactory({
|
|
|
4150
4128
|
shimEdge: true,
|
|
4151
4129
|
shimSafari: true
|
|
4152
4130
|
}) {
|
|
4153
|
-
const logging2 = log$1;
|
|
4154
4131
|
const browserDetails = detectBrowser(window2);
|
|
4155
4132
|
const adapter = {
|
|
4156
4133
|
browserDetails,
|
|
@@ -4162,14 +4139,11 @@ function adapterFactory({
|
|
|
4162
4139
|
switch (browserDetails.browser) {
|
|
4163
4140
|
case "chrome":
|
|
4164
4141
|
if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
|
|
4165
|
-
logging2("Chrome shim is not included in this adapter release.");
|
|
4166
4142
|
return adapter;
|
|
4167
4143
|
}
|
|
4168
4144
|
if (browserDetails.version === null) {
|
|
4169
|
-
logging2("Chrome shim can not determine version, not shimming.");
|
|
4170
4145
|
return adapter;
|
|
4171
4146
|
}
|
|
4172
|
-
logging2("adapter.js shimming chrome.");
|
|
4173
4147
|
adapter.browserShim = chromeShim;
|
|
4174
4148
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4175
4149
|
shimGetUserMedia$3(window2, browserDetails);
|
|
@@ -4189,10 +4163,8 @@ function adapterFactory({
|
|
|
4189
4163
|
break;
|
|
4190
4164
|
case "firefox":
|
|
4191
4165
|
if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
|
|
4192
|
-
logging2("Firefox shim is not included in this adapter release.");
|
|
4193
4166
|
return adapter;
|
|
4194
4167
|
}
|
|
4195
|
-
logging2("adapter.js shimming firefox.");
|
|
4196
4168
|
adapter.browserShim = firefoxShim;
|
|
4197
4169
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4198
4170
|
shimGetUserMedia$1(window2, browserDetails);
|
|
@@ -4213,10 +4185,8 @@ function adapterFactory({
|
|
|
4213
4185
|
break;
|
|
4214
4186
|
case "edge":
|
|
4215
4187
|
if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
|
|
4216
|
-
logging2("MS edge shim is not included in this adapter release.");
|
|
4217
4188
|
return adapter;
|
|
4218
4189
|
}
|
|
4219
|
-
logging2("adapter.js shimming edge.");
|
|
4220
4190
|
adapter.browserShim = edgeShim;
|
|
4221
4191
|
shimGetUserMedia$2(window2);
|
|
4222
4192
|
shimGetDisplayMedia$1(window2);
|
|
@@ -4227,10 +4197,8 @@ function adapterFactory({
|
|
|
4227
4197
|
break;
|
|
4228
4198
|
case "safari":
|
|
4229
4199
|
if (!safariShim || !options.shimSafari) {
|
|
4230
|
-
logging2("Safari shim is not included in this adapter release.");
|
|
4231
4200
|
return adapter;
|
|
4232
4201
|
}
|
|
4233
|
-
logging2("adapter.js shimming safari.");
|
|
4234
4202
|
adapter.browserShim = safariShim;
|
|
4235
4203
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4236
4204
|
shimRTCIceServerUrls(window2);
|
|
@@ -4246,9 +4214,6 @@ function adapterFactory({
|
|
|
4246
4214
|
shimSendThrowTypeError(window2);
|
|
4247
4215
|
removeExtmapAllowMixed(window2, browserDetails);
|
|
4248
4216
|
break;
|
|
4249
|
-
default:
|
|
4250
|
-
logging2("Unsupported browser!");
|
|
4251
|
-
break;
|
|
4252
4217
|
}
|
|
4253
4218
|
return adapter;
|
|
4254
4219
|
}
|
|
@@ -5327,7 +5292,6 @@ validators$1.transitional = function transitional2(validator2, version, message)
|
|
|
5327
5292
|
}
|
|
5328
5293
|
if (version && !deprecatedWarnings[opt]) {
|
|
5329
5294
|
deprecatedWarnings[opt] = true;
|
|
5330
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
5331
5295
|
}
|
|
5332
5296
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
5333
5297
|
};
|
|
@@ -5859,8 +5823,6 @@ class RTCEndpoint extends Event$1 {
|
|
|
5859
5823
|
return this._localStream;
|
|
5860
5824
|
}
|
|
5861
5825
|
}
|
|
5862
|
-
console.log("build date:", BUILD_DATE);
|
|
5863
|
-
console.log("version:", VERSION$1);
|
|
5864
5826
|
const Events = Events$1;
|
|
5865
5827
|
const Endpoint = RTCEndpoint;
|
|
5866
5828
|
|
|
@@ -5970,12 +5932,10 @@ class WebRtcMt {
|
|
|
5970
5932
|
this.startPlay(plays);
|
|
5971
5933
|
resolve(res);
|
|
5972
5934
|
} else {
|
|
5973
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
5974
5935
|
reject("error");
|
|
5975
5936
|
}
|
|
5976
5937
|
});
|
|
5977
5938
|
}).catch(err => {
|
|
5978
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
5979
5939
|
reject("error");
|
|
5980
5940
|
});
|
|
5981
5941
|
});
|
|
@@ -5984,11 +5944,6 @@ class WebRtcMt {
|
|
|
5984
5944
|
switch (type) {
|
|
5985
5945
|
case "err":
|
|
5986
5946
|
throw new Error(text);
|
|
5987
|
-
case "warn":
|
|
5988
|
-
console.log(text);
|
|
5989
|
-
break;
|
|
5990
|
-
default:
|
|
5991
|
-
console.log(text);
|
|
5992
5947
|
}
|
|
5993
5948
|
}
|
|
5994
5949
|
// 停止播放0
|
|
@@ -6032,7 +5987,6 @@ class WebRtcMt {
|
|
|
6032
5987
|
this.rePlay(videoElm);
|
|
6033
5988
|
});
|
|
6034
5989
|
player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
|
|
6035
|
-
console.log("webrtc:" + state);
|
|
6036
5990
|
if (state === "disconnected" || state === "failed") {
|
|
6037
5991
|
this.rePlay(videoElm);
|
|
6038
5992
|
}
|
|
@@ -6040,11 +5994,9 @@ class WebRtcMt {
|
|
|
6040
5994
|
}
|
|
6041
5995
|
// 重播
|
|
6042
5996
|
rePlay(videoElm) {
|
|
6043
|
-
console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
|
|
6044
5997
|
this.stopPlay();
|
|
6045
5998
|
setTimeout(() => {
|
|
6046
5999
|
this.p_player.value = "error";
|
|
6047
|
-
console.log("\u5E95\u90E8\u91CD\u64AD", this.p_player.value);
|
|
6048
6000
|
}, 3 * 1e3);
|
|
6049
6001
|
}
|
|
6050
6002
|
// 播放
|
|
@@ -6170,9 +6122,7 @@ async function fetchApi(url, method, parameter, dataType = "json", headers = {})
|
|
|
6170
6122
|
}
|
|
6171
6123
|
}
|
|
6172
6124
|
newUrl.value = isWithOrigin.value ? url2.href : url2.href.replace(location.origin, "");
|
|
6173
|
-
} catch (e) {
|
|
6174
|
-
console.log(e);
|
|
6175
|
-
}
|
|
6125
|
+
} catch (e) {}
|
|
6176
6126
|
};
|
|
6177
6127
|
if (method === "GET") {
|
|
6178
6128
|
if (parameter) {
|
package/dist/hooks/index.js
CHANGED
|
@@ -158,8 +158,6 @@ const Events$1 = {
|
|
|
158
158
|
WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
|
|
159
159
|
CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
|
|
160
160
|
};
|
|
161
|
-
const VERSION$1 = "1.0.1";
|
|
162
|
-
const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
|
|
163
161
|
function isFirefox() {
|
|
164
162
|
return window.navigator.userAgent.match("Firefox") !== null;
|
|
165
163
|
}
|
|
@@ -189,7 +187,6 @@ class Resolution {
|
|
|
189
187
|
}
|
|
190
188
|
}
|
|
191
189
|
let logDisabled_ = true;
|
|
192
|
-
let deprecationWarnings_ = true;
|
|
193
190
|
function extractVersion(uastring, expr, pos) {
|
|
194
191
|
const match = uastring.match(expr);
|
|
195
192
|
return match && match.length >= pos && parseInt(match[pos], 10);
|
|
@@ -267,7 +264,6 @@ function disableWarnings(bool) {
|
|
|
267
264
|
if (typeof bool !== "boolean") {
|
|
268
265
|
return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
|
|
269
266
|
}
|
|
270
|
-
deprecationWarnings_ = !bool;
|
|
271
267
|
return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
|
|
272
268
|
}
|
|
273
269
|
function log$1() {
|
|
@@ -275,16 +271,7 @@ function log$1() {
|
|
|
275
271
|
if (logDisabled_) {
|
|
276
272
|
return;
|
|
277
273
|
}
|
|
278
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
279
|
-
console.log.apply(console, arguments);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
function deprecated(oldMethod, newMethod) {
|
|
284
|
-
if (!deprecationWarnings_) {
|
|
285
|
-
return;
|
|
286
274
|
}
|
|
287
|
-
console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
|
|
288
275
|
}
|
|
289
276
|
function detectBrowser(window2) {
|
|
290
277
|
const result = {
|
|
@@ -544,7 +531,6 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
|
|
|
544
531
|
return;
|
|
545
532
|
}
|
|
546
533
|
if (typeof getSourceId !== "function") {
|
|
547
|
-
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
548
534
|
return;
|
|
549
535
|
}
|
|
550
536
|
window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
|
|
@@ -1130,9 +1116,7 @@ function filterIceServers$1(iceServers, edgeVersion) {
|
|
|
1130
1116
|
return iceServers.filter(server => {
|
|
1131
1117
|
if (server && (server.urls || server.url)) {
|
|
1132
1118
|
let urls = server.urls || server.url;
|
|
1133
|
-
if (server.url && !server.urls)
|
|
1134
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
1135
|
-
}
|
|
1119
|
+
if (server.url && !server.urls) ;
|
|
1136
1120
|
const isString2 = typeof urls === "string";
|
|
1137
1121
|
if (isString2) {
|
|
1138
1122
|
urls = [urls];
|
|
@@ -1804,9 +1788,7 @@ function filterIceServers(iceServers, edgeVersion) {
|
|
|
1804
1788
|
return iceServers.filter(function (server) {
|
|
1805
1789
|
if (server && (server.urls || server.url)) {
|
|
1806
1790
|
var urls = server.urls || server.url;
|
|
1807
|
-
if (server.url && !server.urls)
|
|
1808
|
-
console.warn("RTCIceServer.url is deprecated! Use urls instead.");
|
|
1809
|
-
}
|
|
1791
|
+
if (server.url && !server.urls) ;
|
|
1810
1792
|
var isString2 = typeof urls === "string";
|
|
1811
1793
|
if (isString2) {
|
|
1812
1794
|
urls = [urls];
|
|
@@ -2665,7 +2647,6 @@ var rtcpeerconnection = function (window2, edgeVersion) {
|
|
|
2665
2647
|
}
|
|
2666
2648
|
pc.transceivers.forEach(function (transceiver) {
|
|
2667
2649
|
if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
|
|
2668
|
-
console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
|
|
2669
2650
|
transceiver.iceTransport.addRemoteCandidate({});
|
|
2670
2651
|
}
|
|
2671
2652
|
});
|
|
@@ -3248,7 +3229,6 @@ function shimGetUserMedia$1(window2, browserDetails) {
|
|
|
3248
3229
|
const navigator2 = window2 && window2.navigator;
|
|
3249
3230
|
const MediaStreamTrack = window2 && window2.MediaStreamTrack;
|
|
3250
3231
|
navigator2.getUserMedia = function (constraints, onSuccess, onError) {
|
|
3251
|
-
deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
|
|
3252
3232
|
navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
|
|
3253
3233
|
};
|
|
3254
3234
|
if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
|
|
@@ -3429,7 +3409,6 @@ function shimRemoveStream(window2) {
|
|
|
3429
3409
|
return;
|
|
3430
3410
|
}
|
|
3431
3411
|
window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
|
|
3432
|
-
deprecated("removeStream", "removeTrack");
|
|
3433
3412
|
this.getSenders().forEach(sender => {
|
|
3434
3413
|
if (sender.track && stream.getTracks().includes(sender.track)) {
|
|
3435
3414
|
this.removeTrack(sender);
|
|
@@ -3761,7 +3740,6 @@ function shimRTCIceServerUrls(window2) {
|
|
|
3761
3740
|
for (let i = 0; i < pcConfig.iceServers.length; i++) {
|
|
3762
3741
|
let server = pcConfig.iceServers[i];
|
|
3763
3742
|
if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
|
|
3764
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
3765
3743
|
server = JSON.parse(JSON.stringify(server));
|
|
3766
3744
|
server.urls = server.url;
|
|
3767
3745
|
delete server.url;
|
|
@@ -4141,7 +4119,6 @@ function adapterFactory({
|
|
|
4141
4119
|
shimEdge: true,
|
|
4142
4120
|
shimSafari: true
|
|
4143
4121
|
}) {
|
|
4144
|
-
const logging2 = log$1;
|
|
4145
4122
|
const browserDetails = detectBrowser(window2);
|
|
4146
4123
|
const adapter = {
|
|
4147
4124
|
browserDetails,
|
|
@@ -4153,14 +4130,11 @@ function adapterFactory({
|
|
|
4153
4130
|
switch (browserDetails.browser) {
|
|
4154
4131
|
case "chrome":
|
|
4155
4132
|
if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
|
|
4156
|
-
logging2("Chrome shim is not included in this adapter release.");
|
|
4157
4133
|
return adapter;
|
|
4158
4134
|
}
|
|
4159
4135
|
if (browserDetails.version === null) {
|
|
4160
|
-
logging2("Chrome shim can not determine version, not shimming.");
|
|
4161
4136
|
return adapter;
|
|
4162
4137
|
}
|
|
4163
|
-
logging2("adapter.js shimming chrome.");
|
|
4164
4138
|
adapter.browserShim = chromeShim;
|
|
4165
4139
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4166
4140
|
shimGetUserMedia$3(window2, browserDetails);
|
|
@@ -4180,10 +4154,8 @@ function adapterFactory({
|
|
|
4180
4154
|
break;
|
|
4181
4155
|
case "firefox":
|
|
4182
4156
|
if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
|
|
4183
|
-
logging2("Firefox shim is not included in this adapter release.");
|
|
4184
4157
|
return adapter;
|
|
4185
4158
|
}
|
|
4186
|
-
logging2("adapter.js shimming firefox.");
|
|
4187
4159
|
adapter.browserShim = firefoxShim;
|
|
4188
4160
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4189
4161
|
shimGetUserMedia$1(window2, browserDetails);
|
|
@@ -4204,10 +4176,8 @@ function adapterFactory({
|
|
|
4204
4176
|
break;
|
|
4205
4177
|
case "edge":
|
|
4206
4178
|
if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
|
|
4207
|
-
logging2("MS edge shim is not included in this adapter release.");
|
|
4208
4179
|
return adapter;
|
|
4209
4180
|
}
|
|
4210
|
-
logging2("adapter.js shimming edge.");
|
|
4211
4181
|
adapter.browserShim = edgeShim;
|
|
4212
4182
|
shimGetUserMedia$2(window2);
|
|
4213
4183
|
shimGetDisplayMedia$1(window2);
|
|
@@ -4218,10 +4188,8 @@ function adapterFactory({
|
|
|
4218
4188
|
break;
|
|
4219
4189
|
case "safari":
|
|
4220
4190
|
if (!safariShim || !options.shimSafari) {
|
|
4221
|
-
logging2("Safari shim is not included in this adapter release.");
|
|
4222
4191
|
return adapter;
|
|
4223
4192
|
}
|
|
4224
|
-
logging2("adapter.js shimming safari.");
|
|
4225
4193
|
adapter.browserShim = safariShim;
|
|
4226
4194
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4227
4195
|
shimRTCIceServerUrls(window2);
|
|
@@ -4237,9 +4205,6 @@ function adapterFactory({
|
|
|
4237
4205
|
shimSendThrowTypeError(window2);
|
|
4238
4206
|
removeExtmapAllowMixed(window2, browserDetails);
|
|
4239
4207
|
break;
|
|
4240
|
-
default:
|
|
4241
|
-
logging2("Unsupported browser!");
|
|
4242
|
-
break;
|
|
4243
4208
|
}
|
|
4244
4209
|
return adapter;
|
|
4245
4210
|
}
|
|
@@ -5318,7 +5283,6 @@ validators$1.transitional = function transitional2(validator2, version, message)
|
|
|
5318
5283
|
}
|
|
5319
5284
|
if (version && !deprecatedWarnings[opt]) {
|
|
5320
5285
|
deprecatedWarnings[opt] = true;
|
|
5321
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
5322
5286
|
}
|
|
5323
5287
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
5324
5288
|
};
|
|
@@ -5850,8 +5814,6 @@ class RTCEndpoint extends Event$1 {
|
|
|
5850
5814
|
return this._localStream;
|
|
5851
5815
|
}
|
|
5852
5816
|
}
|
|
5853
|
-
console.log("build date:", BUILD_DATE);
|
|
5854
|
-
console.log("version:", VERSION$1);
|
|
5855
5817
|
const Events = Events$1;
|
|
5856
5818
|
const Endpoint = RTCEndpoint;
|
|
5857
5819
|
|
|
@@ -5961,12 +5923,10 @@ class WebRtcMt {
|
|
|
5961
5923
|
this.startPlay(plays);
|
|
5962
5924
|
resolve(res);
|
|
5963
5925
|
} else {
|
|
5964
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
5965
5926
|
reject("error");
|
|
5966
5927
|
}
|
|
5967
5928
|
});
|
|
5968
5929
|
}).catch(err => {
|
|
5969
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
5970
5930
|
reject("error");
|
|
5971
5931
|
});
|
|
5972
5932
|
});
|
|
@@ -5975,11 +5935,6 @@ class WebRtcMt {
|
|
|
5975
5935
|
switch (type) {
|
|
5976
5936
|
case "err":
|
|
5977
5937
|
throw new Error(text);
|
|
5978
|
-
case "warn":
|
|
5979
|
-
console.log(text);
|
|
5980
|
-
break;
|
|
5981
|
-
default:
|
|
5982
|
-
console.log(text);
|
|
5983
5938
|
}
|
|
5984
5939
|
}
|
|
5985
5940
|
// 停止播放0
|
|
@@ -6023,7 +5978,6 @@ class WebRtcMt {
|
|
|
6023
5978
|
this.rePlay(videoElm);
|
|
6024
5979
|
});
|
|
6025
5980
|
player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
|
|
6026
|
-
console.log("webrtc:" + state);
|
|
6027
5981
|
if (state === "disconnected" || state === "failed") {
|
|
6028
5982
|
this.rePlay(videoElm);
|
|
6029
5983
|
}
|
|
@@ -6031,11 +5985,9 @@ class WebRtcMt {
|
|
|
6031
5985
|
}
|
|
6032
5986
|
// 重播
|
|
6033
5987
|
rePlay(videoElm) {
|
|
6034
|
-
console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
|
|
6035
5988
|
this.stopPlay();
|
|
6036
5989
|
setTimeout(() => {
|
|
6037
5990
|
this.p_player.value = "error";
|
|
6038
|
-
console.log("\u5E95\u90E8\u91CD\u64AD", this.p_player.value);
|
|
6039
5991
|
}, 3 * 1e3);
|
|
6040
5992
|
}
|
|
6041
5993
|
// 播放
|
|
@@ -6161,9 +6113,7 @@ async function fetchApi(url, method, parameter, dataType = "json", headers = {})
|
|
|
6161
6113
|
}
|
|
6162
6114
|
}
|
|
6163
6115
|
newUrl.value = isWithOrigin.value ? url2.href : url2.href.replace(location.origin, "");
|
|
6164
|
-
} catch (e) {
|
|
6165
|
-
console.log(e);
|
|
6166
|
-
}
|
|
6116
|
+
} catch (e) {}
|
|
6167
6117
|
};
|
|
6168
6118
|
if (method === "GET") {
|
|
6169
6119
|
if (parameter) {
|