mtxt-ui3 0.0.23 → 0.0.25

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.
@@ -281,7 +281,9 @@ 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) {}
284
+ } catch (e) {
285
+ console.log(e);
286
+ }
285
287
  };
286
288
  if (method === "GET") {
287
289
  if (parameter) {
@@ -795,6 +797,8 @@ const Events$1 = {
795
797
  WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
796
798
  CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
797
799
  };
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)";
798
802
  function isFirefox() {
799
803
  return window.navigator.userAgent.match("Firefox") !== null;
800
804
  }
@@ -824,6 +828,7 @@ class Resolution {
824
828
  }
825
829
  }
826
830
  let logDisabled_ = true;
831
+ let deprecationWarnings_ = true;
827
832
  function extractVersion(uastring, expr, pos) {
828
833
  const match = uastring.match(expr);
829
834
  return match && match.length >= pos && parseInt(match[pos], 10);
@@ -901,6 +906,7 @@ function disableWarnings(bool) {
901
906
  if (typeof bool !== "boolean") {
902
907
  return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
903
908
  }
909
+ deprecationWarnings_ = !bool;
904
910
  return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
905
911
  }
906
912
  function log$1() {
@@ -908,8 +914,17 @@ function log$1() {
908
914
  if (logDisabled_) {
909
915
  return;
910
916
  }
917
+ if (typeof console !== "undefined" && typeof console.log === "function") {
918
+ console.log.apply(console, arguments);
919
+ }
911
920
  }
912
921
  }
922
+ function deprecated(oldMethod, newMethod) {
923
+ if (!deprecationWarnings_) {
924
+ return;
925
+ }
926
+ console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
927
+ }
913
928
  function detectBrowser(window2) {
914
929
  const result = {
915
930
  browser: null,
@@ -1168,6 +1183,7 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
1168
1183
  return;
1169
1184
  }
1170
1185
  if (typeof getSourceId !== "function") {
1186
+ console.error("shimGetDisplayMedia: getSourceId argument is not a function");
1171
1187
  return;
1172
1188
  }
1173
1189
  window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
@@ -1753,7 +1769,9 @@ function filterIceServers$1(iceServers, edgeVersion) {
1753
1769
  return iceServers.filter(server => {
1754
1770
  if (server && (server.urls || server.url)) {
1755
1771
  let urls = server.urls || server.url;
1756
- if (server.url && !server.urls) ;
1772
+ if (server.url && !server.urls) {
1773
+ deprecated("RTCIceServer.url", "RTCIceServer.urls");
1774
+ }
1757
1775
  const isString2 = typeof urls === "string";
1758
1776
  if (isString2) {
1759
1777
  urls = [urls];
@@ -2425,7 +2443,9 @@ function filterIceServers(iceServers, edgeVersion) {
2425
2443
  return iceServers.filter(function (server) {
2426
2444
  if (server && (server.urls || server.url)) {
2427
2445
  var urls = server.urls || server.url;
2428
- if (server.url && !server.urls) ;
2446
+ if (server.url && !server.urls) {
2447
+ console.warn("RTCIceServer.url is deprecated! Use urls instead.");
2448
+ }
2429
2449
  var isString2 = typeof urls === "string";
2430
2450
  if (isString2) {
2431
2451
  urls = [urls];
@@ -3284,6 +3304,7 @@ var rtcpeerconnection = function (window2, edgeVersion) {
3284
3304
  }
3285
3305
  pc.transceivers.forEach(function (transceiver) {
3286
3306
  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");
3287
3308
  transceiver.iceTransport.addRemoteCandidate({});
3288
3309
  }
3289
3310
  });
@@ -3866,6 +3887,7 @@ function shimGetUserMedia$1(window2, browserDetails) {
3866
3887
  const navigator2 = window2 && window2.navigator;
3867
3888
  const MediaStreamTrack = window2 && window2.MediaStreamTrack;
3868
3889
  navigator2.getUserMedia = function (constraints, onSuccess, onError) {
3890
+ deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
3869
3891
  navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
3870
3892
  };
3871
3893
  if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
@@ -4046,6 +4068,7 @@ function shimRemoveStream(window2) {
4046
4068
  return;
4047
4069
  }
4048
4070
  window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
4071
+ deprecated("removeStream", "removeTrack");
4049
4072
  this.getSenders().forEach(sender => {
4050
4073
  if (sender.track && stream.getTracks().includes(sender.track)) {
4051
4074
  this.removeTrack(sender);
@@ -4377,6 +4400,7 @@ function shimRTCIceServerUrls(window2) {
4377
4400
  for (let i = 0; i < pcConfig.iceServers.length; i++) {
4378
4401
  let server = pcConfig.iceServers[i];
4379
4402
  if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
4403
+ deprecated("RTCIceServer.url", "RTCIceServer.urls");
4380
4404
  server = JSON.parse(JSON.stringify(server));
4381
4405
  server.urls = server.url;
4382
4406
  delete server.url;
@@ -4756,6 +4780,7 @@ function adapterFactory({
4756
4780
  shimEdge: true,
4757
4781
  shimSafari: true
4758
4782
  }) {
4783
+ const logging2 = log$1;
4759
4784
  const browserDetails = detectBrowser(window2);
4760
4785
  const adapter = {
4761
4786
  browserDetails,
@@ -4767,11 +4792,14 @@ function adapterFactory({
4767
4792
  switch (browserDetails.browser) {
4768
4793
  case "chrome":
4769
4794
  if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
4795
+ logging2("Chrome shim is not included in this adapter release.");
4770
4796
  return adapter;
4771
4797
  }
4772
4798
  if (browserDetails.version === null) {
4799
+ logging2("Chrome shim can not determine version, not shimming.");
4773
4800
  return adapter;
4774
4801
  }
4802
+ logging2("adapter.js shimming chrome.");
4775
4803
  adapter.browserShim = chromeShim;
4776
4804
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4777
4805
  shimGetUserMedia$3(window2, browserDetails);
@@ -4791,8 +4819,10 @@ function adapterFactory({
4791
4819
  break;
4792
4820
  case "firefox":
4793
4821
  if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
4822
+ logging2("Firefox shim is not included in this adapter release.");
4794
4823
  return adapter;
4795
4824
  }
4825
+ logging2("adapter.js shimming firefox.");
4796
4826
  adapter.browserShim = firefoxShim;
4797
4827
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4798
4828
  shimGetUserMedia$1(window2, browserDetails);
@@ -4813,8 +4843,10 @@ function adapterFactory({
4813
4843
  break;
4814
4844
  case "edge":
4815
4845
  if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
4846
+ logging2("MS edge shim is not included in this adapter release.");
4816
4847
  return adapter;
4817
4848
  }
4849
+ logging2("adapter.js shimming edge.");
4818
4850
  adapter.browserShim = edgeShim;
4819
4851
  shimGetUserMedia$2(window2);
4820
4852
  shimGetDisplayMedia$1(window2);
@@ -4825,8 +4857,10 @@ function adapterFactory({
4825
4857
  break;
4826
4858
  case "safari":
4827
4859
  if (!safariShim || !options.shimSafari) {
4860
+ logging2("Safari shim is not included in this adapter release.");
4828
4861
  return adapter;
4829
4862
  }
4863
+ logging2("adapter.js shimming safari.");
4830
4864
  adapter.browserShim = safariShim;
4831
4865
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4832
4866
  shimRTCIceServerUrls(window2);
@@ -4842,6 +4876,9 @@ function adapterFactory({
4842
4876
  shimSendThrowTypeError(window2);
4843
4877
  removeExtmapAllowMixed(window2, browserDetails);
4844
4878
  break;
4879
+ default:
4880
+ logging2("Unsupported browser!");
4881
+ break;
4845
4882
  }
4846
4883
  return adapter;
4847
4884
  }
@@ -5920,6 +5957,7 @@ validators$1.transitional = function transitional2(validator2, version, message)
5920
5957
  }
5921
5958
  if (version && !deprecatedWarnings[opt]) {
5922
5959
  deprecatedWarnings[opt] = true;
5960
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
5923
5961
  }
5924
5962
  return validator2 ? validator2(value, opt, opts) : true;
5925
5963
  };
@@ -6451,6 +6489,8 @@ class RTCEndpoint extends Event$1 {
6451
6489
  return this._localStream;
6452
6490
  }
6453
6491
  }
6492
+ console.log("build date:", BUILD_DATE);
6493
+ console.log("version:", VERSION$1);
6454
6494
  const Events = Events$1;
6455
6495
  const Endpoint = RTCEndpoint;
6456
6496
 
@@ -6518,16 +6558,18 @@ class WebRtcMt$1 {
6518
6558
  if (res.code === 0) {
6519
6559
  this.startPlay(plays);
6520
6560
  } else {
6561
+ console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6521
6562
  setTimeout(() => {
6522
6563
  this.rePlay();
6523
- }, 3 * 60 * 1e3);
6564
+ }, 10 * 1e3);
6524
6565
  }
6525
6566
  resolve(res);
6526
6567
  });
6527
6568
  }).catch(err => {
6569
+ console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6528
6570
  setTimeout(() => {
6529
6571
  this.rePlay();
6530
- }, 3 * 60 * 1e3);
6572
+ }, 10 * 1e3);
6531
6573
  });
6532
6574
  });
6533
6575
  }
@@ -6535,6 +6577,11 @@ class WebRtcMt$1 {
6535
6577
  switch (type) {
6536
6578
  case "err":
6537
6579
  throw new Error(text);
6580
+ case "warn":
6581
+ console.log(text);
6582
+ break;
6583
+ default:
6584
+ console.log(text);
6538
6585
  }
6539
6586
  }
6540
6587
  // 停止播放0
@@ -6578,6 +6625,7 @@ class WebRtcMt$1 {
6578
6625
  this.rePlay(videoElm);
6579
6626
  });
6580
6627
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6628
+ console.log("webrtc:" + state);
6581
6629
  if (state === "disconnected" || state === "failed") {
6582
6630
  this.rePlay(videoElm);
6583
6631
  }
@@ -6585,8 +6633,10 @@ class WebRtcMt$1 {
6585
6633
  }
6586
6634
  // 重播
6587
6635
  rePlay(videoElm) {
6636
+ console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6588
6637
  this.stopPlay();
6589
6638
  setTimeout(() => {
6639
+ console.log("\u5E95\u90E8\u91CD\u64AD");
6590
6640
  this.init(this.opt);
6591
6641
  }, 5 * 1e3);
6592
6642
  }
@@ -6866,6 +6916,11 @@ class WebRtcMt {
6866
6916
  switch (type) {
6867
6917
  case "err":
6868
6918
  throw new Error(text);
6919
+ case "warn":
6920
+ console.warn(text);
6921
+ break;
6922
+ default:
6923
+ console.info(text);
6869
6924
  }
6870
6925
  }
6871
6926
  // 停止播放0
@@ -271,7 +271,9 @@ 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) {}
274
+ } catch (e) {
275
+ console.log(e);
276
+ }
275
277
  };
276
278
  if (method === "GET") {
277
279
  if (parameter) {
@@ -785,6 +787,8 @@ const Events$1 = {
785
787
  WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
786
788
  CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
787
789
  };
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)";
788
792
  function isFirefox() {
789
793
  return window.navigator.userAgent.match("Firefox") !== null;
790
794
  }
@@ -814,6 +818,7 @@ class Resolution {
814
818
  }
815
819
  }
816
820
  let logDisabled_ = true;
821
+ let deprecationWarnings_ = true;
817
822
  function extractVersion(uastring, expr, pos) {
818
823
  const match = uastring.match(expr);
819
824
  return match && match.length >= pos && parseInt(match[pos], 10);
@@ -891,6 +896,7 @@ function disableWarnings(bool) {
891
896
  if (typeof bool !== "boolean") {
892
897
  return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
893
898
  }
899
+ deprecationWarnings_ = !bool;
894
900
  return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
895
901
  }
896
902
  function log$1() {
@@ -898,8 +904,17 @@ function log$1() {
898
904
  if (logDisabled_) {
899
905
  return;
900
906
  }
907
+ if (typeof console !== "undefined" && typeof console.log === "function") {
908
+ console.log.apply(console, arguments);
909
+ }
901
910
  }
902
911
  }
912
+ function deprecated(oldMethod, newMethod) {
913
+ if (!deprecationWarnings_) {
914
+ return;
915
+ }
916
+ console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
917
+ }
903
918
  function detectBrowser(window2) {
904
919
  const result = {
905
920
  browser: null,
@@ -1158,6 +1173,7 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
1158
1173
  return;
1159
1174
  }
1160
1175
  if (typeof getSourceId !== "function") {
1176
+ console.error("shimGetDisplayMedia: getSourceId argument is not a function");
1161
1177
  return;
1162
1178
  }
1163
1179
  window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
@@ -1743,7 +1759,9 @@ function filterIceServers$1(iceServers, edgeVersion) {
1743
1759
  return iceServers.filter(server => {
1744
1760
  if (server && (server.urls || server.url)) {
1745
1761
  let urls = server.urls || server.url;
1746
- if (server.url && !server.urls) ;
1762
+ if (server.url && !server.urls) {
1763
+ deprecated("RTCIceServer.url", "RTCIceServer.urls");
1764
+ }
1747
1765
  const isString2 = typeof urls === "string";
1748
1766
  if (isString2) {
1749
1767
  urls = [urls];
@@ -2415,7 +2433,9 @@ function filterIceServers(iceServers, edgeVersion) {
2415
2433
  return iceServers.filter(function (server) {
2416
2434
  if (server && (server.urls || server.url)) {
2417
2435
  var urls = server.urls || server.url;
2418
- if (server.url && !server.urls) ;
2436
+ if (server.url && !server.urls) {
2437
+ console.warn("RTCIceServer.url is deprecated! Use urls instead.");
2438
+ }
2419
2439
  var isString2 = typeof urls === "string";
2420
2440
  if (isString2) {
2421
2441
  urls = [urls];
@@ -3274,6 +3294,7 @@ var rtcpeerconnection = function (window2, edgeVersion) {
3274
3294
  }
3275
3295
  pc.transceivers.forEach(function (transceiver) {
3276
3296
  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");
3277
3298
  transceiver.iceTransport.addRemoteCandidate({});
3278
3299
  }
3279
3300
  });
@@ -3856,6 +3877,7 @@ function shimGetUserMedia$1(window2, browserDetails) {
3856
3877
  const navigator2 = window2 && window2.navigator;
3857
3878
  const MediaStreamTrack = window2 && window2.MediaStreamTrack;
3858
3879
  navigator2.getUserMedia = function (constraints, onSuccess, onError) {
3880
+ deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
3859
3881
  navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
3860
3882
  };
3861
3883
  if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
@@ -4036,6 +4058,7 @@ function shimRemoveStream(window2) {
4036
4058
  return;
4037
4059
  }
4038
4060
  window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
4061
+ deprecated("removeStream", "removeTrack");
4039
4062
  this.getSenders().forEach(sender => {
4040
4063
  if (sender.track && stream.getTracks().includes(sender.track)) {
4041
4064
  this.removeTrack(sender);
@@ -4367,6 +4390,7 @@ function shimRTCIceServerUrls(window2) {
4367
4390
  for (let i = 0; i < pcConfig.iceServers.length; i++) {
4368
4391
  let server = pcConfig.iceServers[i];
4369
4392
  if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
4393
+ deprecated("RTCIceServer.url", "RTCIceServer.urls");
4370
4394
  server = JSON.parse(JSON.stringify(server));
4371
4395
  server.urls = server.url;
4372
4396
  delete server.url;
@@ -4746,6 +4770,7 @@ function adapterFactory({
4746
4770
  shimEdge: true,
4747
4771
  shimSafari: true
4748
4772
  }) {
4773
+ const logging2 = log$1;
4749
4774
  const browserDetails = detectBrowser(window2);
4750
4775
  const adapter = {
4751
4776
  browserDetails,
@@ -4757,11 +4782,14 @@ function adapterFactory({
4757
4782
  switch (browserDetails.browser) {
4758
4783
  case "chrome":
4759
4784
  if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
4785
+ logging2("Chrome shim is not included in this adapter release.");
4760
4786
  return adapter;
4761
4787
  }
4762
4788
  if (browserDetails.version === null) {
4789
+ logging2("Chrome shim can not determine version, not shimming.");
4763
4790
  return adapter;
4764
4791
  }
4792
+ logging2("adapter.js shimming chrome.");
4765
4793
  adapter.browserShim = chromeShim;
4766
4794
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4767
4795
  shimGetUserMedia$3(window2, browserDetails);
@@ -4781,8 +4809,10 @@ function adapterFactory({
4781
4809
  break;
4782
4810
  case "firefox":
4783
4811
  if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
4812
+ logging2("Firefox shim is not included in this adapter release.");
4784
4813
  return adapter;
4785
4814
  }
4815
+ logging2("adapter.js shimming firefox.");
4786
4816
  adapter.browserShim = firefoxShim;
4787
4817
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4788
4818
  shimGetUserMedia$1(window2, browserDetails);
@@ -4803,8 +4833,10 @@ function adapterFactory({
4803
4833
  break;
4804
4834
  case "edge":
4805
4835
  if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
4836
+ logging2("MS edge shim is not included in this adapter release.");
4806
4837
  return adapter;
4807
4838
  }
4839
+ logging2("adapter.js shimming edge.");
4808
4840
  adapter.browserShim = edgeShim;
4809
4841
  shimGetUserMedia$2(window2);
4810
4842
  shimGetDisplayMedia$1(window2);
@@ -4815,8 +4847,10 @@ function adapterFactory({
4815
4847
  break;
4816
4848
  case "safari":
4817
4849
  if (!safariShim || !options.shimSafari) {
4850
+ logging2("Safari shim is not included in this adapter release.");
4818
4851
  return adapter;
4819
4852
  }
4853
+ logging2("adapter.js shimming safari.");
4820
4854
  adapter.browserShim = safariShim;
4821
4855
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4822
4856
  shimRTCIceServerUrls(window2);
@@ -4832,6 +4866,9 @@ function adapterFactory({
4832
4866
  shimSendThrowTypeError(window2);
4833
4867
  removeExtmapAllowMixed(window2, browserDetails);
4834
4868
  break;
4869
+ default:
4870
+ logging2("Unsupported browser!");
4871
+ break;
4835
4872
  }
4836
4873
  return adapter;
4837
4874
  }
@@ -5910,6 +5947,7 @@ validators$1.transitional = function transitional2(validator2, version, message)
5910
5947
  }
5911
5948
  if (version && !deprecatedWarnings[opt]) {
5912
5949
  deprecatedWarnings[opt] = true;
5950
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
5913
5951
  }
5914
5952
  return validator2 ? validator2(value, opt, opts) : true;
5915
5953
  };
@@ -6441,6 +6479,8 @@ class RTCEndpoint extends Event$1 {
6441
6479
  return this._localStream;
6442
6480
  }
6443
6481
  }
6482
+ console.log("build date:", BUILD_DATE);
6483
+ console.log("version:", VERSION$1);
6444
6484
  const Events = Events$1;
6445
6485
  const Endpoint = RTCEndpoint;
6446
6486
 
@@ -6508,16 +6548,18 @@ class WebRtcMt$1 {
6508
6548
  if (res.code === 0) {
6509
6549
  this.startPlay(plays);
6510
6550
  } else {
6551
+ console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6511
6552
  setTimeout(() => {
6512
6553
  this.rePlay();
6513
- }, 3 * 60 * 1e3);
6554
+ }, 10 * 1e3);
6514
6555
  }
6515
6556
  resolve(res);
6516
6557
  });
6517
6558
  }).catch(err => {
6559
+ console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6518
6560
  setTimeout(() => {
6519
6561
  this.rePlay();
6520
- }, 3 * 60 * 1e3);
6562
+ }, 10 * 1e3);
6521
6563
  });
6522
6564
  });
6523
6565
  }
@@ -6525,6 +6567,11 @@ class WebRtcMt$1 {
6525
6567
  switch (type) {
6526
6568
  case "err":
6527
6569
  throw new Error(text);
6570
+ case "warn":
6571
+ console.log(text);
6572
+ break;
6573
+ default:
6574
+ console.log(text);
6528
6575
  }
6529
6576
  }
6530
6577
  // 停止播放0
@@ -6568,6 +6615,7 @@ class WebRtcMt$1 {
6568
6615
  this.rePlay(videoElm);
6569
6616
  });
6570
6617
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6618
+ console.log("webrtc:" + state);
6571
6619
  if (state === "disconnected" || state === "failed") {
6572
6620
  this.rePlay(videoElm);
6573
6621
  }
@@ -6575,8 +6623,10 @@ class WebRtcMt$1 {
6575
6623
  }
6576
6624
  // 重播
6577
6625
  rePlay(videoElm) {
6626
+ console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6578
6627
  this.stopPlay();
6579
6628
  setTimeout(() => {
6629
+ console.log("\u5E95\u90E8\u91CD\u64AD");
6580
6630
  this.init(this.opt);
6581
6631
  }, 5 * 1e3);
6582
6632
  }
@@ -6856,6 +6906,11 @@ class WebRtcMt {
6856
6906
  switch (type) {
6857
6907
  case "err":
6858
6908
  throw new Error(text);
6909
+ case "warn":
6910
+ console.warn(text);
6911
+ break;
6912
+ default:
6913
+ console.info(text);
6859
6914
  }
6860
6915
  }
6861
6916
  // 停止播放0