@stormstreaming/stormstreamer 0.9.0-beta.5 → 0.9.0-beta.7

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/amd/index.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * contact@stormstreaming.com
5
5
  * https://stormstreaming.com
6
6
  *
7
- * Version: 0.9.0-beta.5
8
- * Version: 12/10/2024, 10:26:03 AM
7
+ * Version: 0.9.0-beta.7
8
+ * Version: 1/2/2025, 1:53:46 AM
9
9
  *
10
10
  * LEGAL NOTICE:
11
11
  * This software is subject to the terms and conditions defined in
@@ -578,7 +578,7 @@
578
578
  this.startOnDOMReady = false;
579
579
  this.iOSOnDomReadyFix = true;
580
580
  this._restartOnFocus = true;
581
- this._forceDeviceSelection = false;
581
+ this._preselectDevices = true;
582
582
  this.parse(config);
583
583
  }
584
584
  parse(config) {
@@ -589,7 +589,7 @@
589
589
  this._restartOnFocus = (_c = this._settingsConfig.restartOnFocus) !== null && _c !== void 0 ? _c : this._restartOnFocus;
590
590
  this._restartOnError = (_d = this._settingsConfig.restartOnError) !== null && _d !== void 0 ? _d : this._restartOnError;
591
591
  this._reconnectTime = (_e = this._settingsConfig.reconnectTime) !== null && _e !== void 0 ? _e : this._reconnectTime;
592
- this._forceDeviceSelection = (_f = this._settingsConfig.forceDeviceSelection) !== null && _f !== void 0 ? _f : this._forceDeviceSelection;
592
+ this._preselectDevices = (_f = this._settingsConfig.preselectDevices) !== null && _f !== void 0 ? _f : this._preselectDevices;
593
593
  this._videoData = new VideoData((_g = this._settingsConfig.video) !== null && _g !== void 0 ? _g : null);
594
594
  this._audioData = new AudioData((_h = this._settingsConfig.audio) !== null && _h !== void 0 ? _h : null);
595
595
  this._storageData = new StorageData((_j = this._settingsConfig.storage) !== null && _j !== void 0 ? _j : null);
@@ -626,7 +626,7 @@
626
626
  return this._debugData;
627
627
  }
628
628
  getIfForceSelection() {
629
- return this._forceDeviceSelection;
629
+ return !this._preselectDevices;
630
630
  }
631
631
  getIfStartOnDOMReadyEnabled() {
632
632
  return this.startOnDOMReady;
@@ -2576,15 +2576,15 @@
2576
2576
  }
2577
2577
  }
2578
2578
 
2579
- var InputDeviceState;
2580
- (function (InputDeviceState) {
2581
- InputDeviceState["NOT_INITIALIZED"] = "NOT_INITIALIZED";
2582
- InputDeviceState["INITIALIZED"] = "INITIALIZED";
2583
- InputDeviceState["READY"] = "READY";
2584
- InputDeviceState["UPDATING"] = "UPDATING";
2585
- InputDeviceState["INVALID"] = "INVALID";
2586
- InputDeviceState["UNKNOWN"] = "UNKNOWN";
2587
- })(InputDeviceState || (InputDeviceState = {}));
2579
+ exports.DevicesState = void 0;
2580
+ (function (DevicesState) {
2581
+ DevicesState["NOT_INITIALIZED"] = "NOT_INITIALIZED";
2582
+ DevicesState["INITIALIZED"] = "INITIALIZED";
2583
+ DevicesState["READY"] = "READY";
2584
+ DevicesState["UPDATING"] = "UPDATING";
2585
+ DevicesState["INVALID"] = "INVALID";
2586
+ DevicesState["UNKNOWN"] = "UNKNOWN";
2587
+ })(exports.DevicesState || (exports.DevicesState = {}));
2588
2588
 
2589
2589
  class PlaybackController {
2590
2590
  constructor(main) {
@@ -2615,41 +2615,75 @@
2615
2615
  },
2616
2616
  audio: true
2617
2617
  };
2618
+ this._restartTimerCount = 0;
2619
+ this._restartTimerMaxCount = 5;
2618
2620
  this._publishState = exports.PublishState.NOT_INITIALIZED;
2619
- this._inputDeviceState = InputDeviceState.NOT_INITIALIZED;
2621
+ this._inputDeviceState = exports.DevicesState.NOT_INITIALIZED;
2620
2622
  this.onServerDisconnect = () => {};
2623
+ this.onStreamKeyTaken = () => {
2624
+ if (this._restartTimer != null) {
2625
+ clearInterval(this._restartTimer);
2626
+ this._restartTimerCount = 0;
2627
+ }
2628
+ this._logger.info(this, "WebRTCStreamer :: Starting StreamKeyTaken Interval");
2629
+ this._restartTimer = setInterval(() => {
2630
+ var _a, _b;
2631
+ if (this._restartTimer != null) {
2632
+ if (this._restartTimerCount < this._restartTimerMaxCount) {
2633
+ this._logger.info(this, "WebRTCStreamer :: StreamKeyTaken Interval: " + this._restartTimerCount + "/" + this._restartTimerMaxCount);
2634
+ this._restartTimerCount++;
2635
+ } else {
2636
+ clearInterval(this._restartTimer);
2637
+ this._restartTimer = null;
2638
+ this._restartTimerCount = 0;
2639
+ const streamData = (_a = this._main.getConfigManager()) === null || _a === void 0 ? void 0 : _a.getStreamData();
2640
+ const streamKey = streamData === null || streamData === void 0 ? void 0 : streamData.streamKey;
2641
+ if (streamKey != null) {
2642
+ const prevStreamKey = streamKey;
2643
+ this.publish(prevStreamKey);
2644
+ }
2645
+ }
2646
+ const usedStreamKey = (_b = this._main.getConfigManager().getStreamData().streamKey) !== null && _b !== void 0 ? _b : "unknown";
2647
+ this._main.dispatchEvent("streamKeyInUseInterval", {
2648
+ ref: this._main,
2649
+ streamKey: usedStreamKey,
2650
+ count: this._restartTimerCount,
2651
+ maxCount: this._restartTimerMaxCount
2652
+ });
2653
+ }
2654
+ }, 1000);
2655
+ };
2621
2656
  this.onServerConnect = () => {
2622
2657
  if (this._peerConnection) {
2623
2658
  this.closeWebRTCConnection();
2624
2659
  }
2625
2660
  this._peerConnection = new RTCPeerConnection(this._peerConnectionConfig);
2661
+ if (this._stream) {
2662
+ let localTracks = this._stream.getTracks();
2663
+ for (let localTrack in localTracks) {
2664
+ this._peerConnection.addTrack(localTracks[localTrack], this._stream);
2665
+ }
2666
+ }
2626
2667
  this._peerConnection.onicecandidate = event => {
2627
2668
  this.onIceCandidate(event);
2628
2669
  };
2629
2670
  this._peerConnection.onconnectionstatechange = event => {
2630
2671
  this.onConnectionStateChange(event);
2631
2672
  };
2632
- this._peerConnection.onnegotiationneeded = event => {
2673
+ this._peerConnection.onnegotiationneeded = event => __awaiter(this, void 0, void 0, function* () {
2633
2674
  if (this._peerConnection) {
2634
- this._peerConnection.createOffer(description => {
2635
- this.onDescriptionSuccess(description);
2636
- }, error => {
2675
+ try {
2676
+ const description = yield this._peerConnection.createOffer();
2677
+ yield this.onDescriptionSuccess(description);
2678
+ } catch (error) {
2637
2679
  this.onDescriptionError(error);
2638
- }).catch(reason => {
2639
- console.log(reason);
2640
- });
2641
- }
2642
- };
2643
- if (this._stream) {
2644
- let localTracks = this._stream.getTracks();
2645
- for (let localTrack in localTracks) {
2646
- this._peerConnection.addTrack(localTracks[localTrack], this._stream);
2680
+ console.error('Error creating offer:', error);
2681
+ }
2647
2682
  }
2648
- }
2683
+ });
2649
2684
  };
2650
2685
  this.onDescriptionSuccess = description => {
2651
2686
  var _a, _b, _c;
2652
- console.log('%c⏵ 🎥 onDescriptionSuccess ', 'background: green; color: white;');
2653
2687
  const streamInfo = {
2654
2688
  applicationName: (_b = (_a = this._main.getNetworkController()) === null || _a === void 0 ? void 0 : _a.getConnection().getCurrentServer()) === null || _b === void 0 ? void 0 : _b.getApplication(),
2655
2689
  streamName: (_c = this._main.getConfigManager()) === null || _c === void 0 ? void 0 : _c.getStreamData().streamKey,
@@ -2700,6 +2734,7 @@
2700
2734
  var _a, _b;
2701
2735
  this._main.addEventListener("serverConnect", this.onServerConnect, false);
2702
2736
  this._main.addEventListener("serverDisconnect", this.onServerDisconnect, false);
2737
+ this._main.addEventListener("streamKeyInUse", this.onStreamKeyTaken, false);
2703
2738
  document.addEventListener("visibilitychange", this.visibilityChange);
2704
2739
  window.addEventListener("blur", this.onWindowBlur);
2705
2740
  window.addEventListener("focus", this.onWindowFocus);
@@ -2754,7 +2789,7 @@
2754
2789
  handlePermissionChange(device, state) {
2755
2790
  return __awaiter(this, void 0, void 0, function* () {
2756
2791
  if (state === 'denied') {
2757
- this.setInputDeviceState(InputDeviceState.INVALID);
2792
+ this.setInputDeviceState(exports.DevicesState.INVALID);
2758
2793
  if (this._publishState == exports.PublishState.PUBLISHED) {
2759
2794
  this.closeStream();
2760
2795
  }
@@ -2808,6 +2843,7 @@
2808
2843
  this._logger.warning(this, "Cannot publish - stream not ready (missing video or audio track)");
2809
2844
  return false;
2810
2845
  }
2846
+ this._logger.info(this, "Publish: " + streamKey);
2811
2847
  this.closeWebRTCConnection();
2812
2848
  this._main.getConfigManager().getStreamData().streamKey = streamKey;
2813
2849
  this._main.dispatchEvent("publish", {
@@ -2855,7 +2891,6 @@
2855
2891
  console.error("Error checking device availability:", error);
2856
2892
  }
2857
2893
  if (isFirefox) {
2858
- console.log("Firefox detected, using direct getUserMedia check...");
2859
2894
  if (results.camera.available) {
2860
2895
  try {
2861
2896
  const stream = yield navigator.mediaDevices.getUserMedia({
@@ -2864,7 +2899,7 @@
2864
2899
  results.camera.allowed = true;
2865
2900
  stream.getTracks().forEach(track => track.stop());
2866
2901
  } catch (e) {
2867
- console.log("Camera permission check failed:", e);
2902
+ this._logger.error(this, "Camera permission check failed: " + JSON.stringify(e));
2868
2903
  results.camera.allowed = false;
2869
2904
  }
2870
2905
  }
@@ -2876,7 +2911,7 @@
2876
2911
  results.microphone.allowed = true;
2877
2912
  stream.getTracks().forEach(track => track.stop());
2878
2913
  } catch (e) {
2879
- console.log("Microphone permission check failed:", e);
2914
+ this._logger.error(this, "Microphone permission check failed: " + JSON.stringify(e));
2880
2915
  results.microphone.allowed = false;
2881
2916
  }
2882
2917
  }
@@ -2903,22 +2938,23 @@
2903
2938
  }
2904
2939
  stream.getTracks().forEach(track => track.stop());
2905
2940
  } catch (error) {
2906
- console.log("Additional permission check failed:", error);
2941
+ this._logger.error(this, "Additional permission check failed " + JSON.stringify(error));
2907
2942
  }
2908
2943
  }
2909
2944
  } catch (error) {
2910
- console.error("Error checking permissions:", error);
2945
+ this._logger.error(this, "Error checking permissions " + JSON.stringify(error));
2911
2946
  }
2912
2947
  }
2913
2948
  return results;
2914
2949
  });
2915
2950
  }
2916
2951
  onSocketMessage(data) {
2952
+ var _a;
2917
2953
  let msgJSON = JSON.parse(data);
2918
2954
  let msgStatus = Number(msgJSON["status"]);
2919
2955
  switch (msgStatus) {
2920
2956
  case 200:
2921
- console.log('%c⏵ 🎥 onSocketMessage: 200', 'background: green; color: white;');
2957
+ this._logger.info(this, "SDP Exchange Successful");
2922
2958
  let sdpData = msgJSON['sdp'];
2923
2959
  if (sdpData !== undefined) {
2924
2960
  this._peerConnection.setRemoteDescription(new RTCSessionDescription(sdpData), () => {}, () => {});
@@ -2931,17 +2967,18 @@
2931
2967
  }
2932
2968
  break;
2933
2969
  case 503:
2934
- console.log('%c⏵ 🎥 onSocketMessage: 503', 'background: green; color: white;');
2970
+ this._logger.error(this, "StreamKey already use");
2971
+ const usedStreamKey = (_a = this._main.getConfigManager().getStreamData().streamKey) !== null && _a !== void 0 ? _a : "unknown";
2935
2972
  this._main.dispatchEvent("streamKeyInUse", {
2936
2973
  ref: this._main,
2937
- streamKey: this._main.getConfigManager().getStreamData().streamKey
2974
+ streamKey: usedStreamKey
2938
2975
  });
2939
2976
  this.setPublishState(exports.PublishState.ERROR);
2940
2977
  break;
2941
2978
  }
2942
2979
  }
2943
2980
  onConnectionStateChange(event) {
2944
- console.log('%c⏵ 🎥 onConnectionStateChange: ' + event.currentTarget.connectionState, 'background: green; color: white;');
2981
+ this._logger.info(this, "Connection State Change: " + JSON.stringify(event));
2945
2982
  if (event !== null) {
2946
2983
  switch (event.currentTarget.connectionState) {
2947
2984
  case "connecting":
@@ -3013,12 +3050,12 @@
3013
3050
  this._selectedMicrophone = this.pickMicrophone();
3014
3051
  }
3015
3052
  if (this._selectedCamera != null && this._selectedMicrophone != null) {
3016
- this.setInputDeviceState(InputDeviceState.READY);
3053
+ this.setInputDeviceState(exports.DevicesState.READY);
3017
3054
  } else {
3018
- this.setInputDeviceState(InputDeviceState.INVALID);
3055
+ this.setInputDeviceState(exports.DevicesState.INVALID);
3019
3056
  }
3020
3057
  } catch (error) {
3021
- this.setInputDeviceState(InputDeviceState.INVALID);
3058
+ this.setInputDeviceState(exports.DevicesState.INVALID);
3022
3059
  this._logger.error(this, "Errror on grab devices: " + JSON.stringify(error));
3023
3060
  }
3024
3061
  this._main.dispatchEvent("deviceListUpdate", {
@@ -3045,13 +3082,12 @@
3045
3082
  selectCamera(cameraID) {
3046
3083
  var _a, _b;
3047
3084
  this._selectedCamera = null;
3048
- this.setInputDeviceState(InputDeviceState.UPDATING);
3085
+ this.setInputDeviceState(exports.DevicesState.UPDATING);
3049
3086
  const streamKey = (_a = this._main.getConfigManager()) === null || _a === void 0 ? void 0 : _a.getStreamData().streamKey;
3050
3087
  const wasPublished = this._publishState === exports.PublishState.PUBLISHED;
3051
3088
  for (let i = 0; i < this._cameraList.getSize(); i++) {
3052
3089
  if (this._cameraList.get(i).getID() == cameraID) {
3053
3090
  this._selectedCamera = this._cameraList.get(i);
3054
- console.log("kamera znaleziona i zapisana " + this._cameraList.get(i).getLabel() + " " + this._cameraList.get(i).getID());
3055
3091
  (_b = this._main.getStorageManager()) === null || _b === void 0 ? void 0 : _b.saveField("cameraID", this._selectedCamera.getID());
3056
3092
  break;
3057
3093
  }
@@ -3060,9 +3096,9 @@
3060
3096
  if (this._selectedCamera != null) {
3061
3097
  this._constraints.video.deviceId = this._selectedCamera.getID();
3062
3098
  if (this._selectedCamera != null && this._selectedMicrophone != null) {
3063
- this.setInputDeviceState(InputDeviceState.READY);
3099
+ this.setInputDeviceState(exports.DevicesState.READY);
3064
3100
  } else {
3065
- this.setInputDeviceState(InputDeviceState.INVALID);
3101
+ this.setInputDeviceState(exports.DevicesState.INVALID);
3066
3102
  }
3067
3103
  this.startCamera().then(() => {
3068
3104
  if (wasPublished && streamKey) {
@@ -3070,15 +3106,15 @@
3070
3106
  }
3071
3107
  });
3072
3108
  } else {
3073
- this.setInputDeviceState(InputDeviceState.INVALID);
3109
+ this.setInputDeviceState(exports.DevicesState.INVALID);
3074
3110
  }
3075
3111
  }
3076
3112
  selectMicrophone(micID) {
3077
3113
  var _a, _b, _c, _d;
3078
3114
  return __awaiter(this, void 0, void 0, function* () {
3079
3115
  this._selectedMicrophone = null;
3080
- this.setInputDeviceState(InputDeviceState.UPDATING);
3081
- console.log("🎤 Selecting microphone:", micID);
3116
+ this.setInputDeviceState(exports.DevicesState.UPDATING);
3117
+ this._logger.info(this, "Selecting microphone: " + micID);
3082
3118
  const streamKey = (_a = this._main.getConfigManager()) === null || _a === void 0 ? void 0 : _a.getStreamData().streamKey;
3083
3119
  const wasPublished = this._publishState === exports.PublishState.PUBLISHED;
3084
3120
  for (let i = 0; i < this._microphoneList.getSize(); i++) {
@@ -3111,16 +3147,16 @@
3111
3147
  }
3112
3148
  }
3113
3149
  if (this._selectedCamera != null && this._selectedMicrophone != null) {
3114
- this.setInputDeviceState(InputDeviceState.READY);
3150
+ this.setInputDeviceState(exports.DevicesState.READY);
3115
3151
  } else {
3116
- this.setInputDeviceState(InputDeviceState.INVALID);
3152
+ this.setInputDeviceState(exports.DevicesState.INVALID);
3117
3153
  }
3118
3154
  if (wasPublished && streamKey) {
3119
3155
  this.publish(streamKey);
3120
3156
  }
3121
3157
  } catch (error) {
3122
3158
  console.error("Error changing microphone:", error);
3123
- this.setInputDeviceState(InputDeviceState.INVALID);
3159
+ this.setInputDeviceState(exports.DevicesState.INVALID);
3124
3160
  this._main.dispatchEvent("inputDeviceError", {
3125
3161
  ref: this._main
3126
3162
  });
@@ -3130,7 +3166,6 @@
3130
3166
  startCamera() {
3131
3167
  return __awaiter(this, void 0, void 0, function* () {
3132
3168
  if (this._stream) {
3133
- console.log("Stopping existing stream before starting new one");
3134
3169
  this._stream.getTracks().forEach(track => {
3135
3170
  track.stop();
3136
3171
  });
@@ -3196,7 +3231,7 @@
3196
3231
  this.setPublishState(exports.PublishState.UNPUBLISHED);
3197
3232
  }
3198
3233
  pickCamera() {
3199
- var _a, _b, _c;
3234
+ var _a, _b, _c, _d;
3200
3235
  for (let i = 0; i < this._cameraList.getSize(); i++) {
3201
3236
  this._cameraList.get(i).setSelected(false);
3202
3237
  }
@@ -3229,6 +3264,7 @@
3229
3264
  if (!((_c = this._main.getConfigManager()) === null || _c === void 0 ? void 0 : _c.getSettingsData().getIfForceSelection())) {
3230
3265
  this._selectedCamera = this._cameraList.get(0);
3231
3266
  this._selectedCamera.setSelected(true);
3267
+ (_d = this._main.getStorageManager()) === null || _d === void 0 ? void 0 : _d.saveField("cameraID", this._selectedCamera.getID());
3232
3268
  this._constraints.video.deviceId = this._selectedCamera.getID();
3233
3269
  } else {
3234
3270
  return null;
@@ -3243,7 +3279,7 @@
3243
3279
  return this._selectedCamera;
3244
3280
  }
3245
3281
  pickMicrophone() {
3246
- var _a, _b, _c;
3282
+ var _a, _b, _c, _d;
3247
3283
  for (let i = 0; i < this._microphoneList.getSize(); i++) {
3248
3284
  this._microphoneList.get(i).setSelected(false);
3249
3285
  }
@@ -3273,6 +3309,7 @@
3273
3309
  });
3274
3310
  if (!((_c = this._main.getConfigManager()) === null || _c === void 0 ? void 0 : _c.getSettingsData().getIfForceSelection())) {
3275
3311
  this._selectedMicrophone = this._microphoneList.get(0);
3312
+ (_d = this._main.getStorageManager()) === null || _d === void 0 ? void 0 : _d.saveField("microphoneID", this._selectedMicrophone.getID());
3276
3313
  } else {
3277
3314
  return null;
3278
3315
  }
@@ -3355,6 +3392,7 @@
3355
3392
  return this._selectedMicrophone;
3356
3393
  }
3357
3394
  setPublishState(newState) {
3395
+ this._logger.info(this, "Publish State: " + newState);
3358
3396
  this._publishState = newState;
3359
3397
  this._main.dispatchEvent("publishStateChange", {
3360
3398
  ref: this._main,
@@ -3399,7 +3437,6 @@
3399
3437
  }
3400
3438
  forceStopAllStreams() {
3401
3439
  var _a, _b;
3402
- console.log("Force stopping all streams...");
3403
3440
  if (this._peerConnection) {
3404
3441
  try {
3405
3442
  const senders = this._peerConnection.getSenders();
@@ -3443,13 +3480,10 @@
3443
3480
  if (this._stream) {
3444
3481
  try {
3445
3482
  const tracks = this._stream.getTracks();
3446
- console.log(`Stopping ${tracks.length} tracks from main stream`);
3447
3483
  tracks.forEach(track => {
3448
3484
  try {
3449
- console.log(`Stopping ${track.kind} track, enabled: ${track.enabled}, state: ${track.readyState}`);
3450
3485
  track.enabled = false;
3451
3486
  track.stop();
3452
- console.log(`Track after stop - state: ${track.readyState}`);
3453
3487
  } catch (e) {
3454
3488
  console.error(`Error stopping ${track.kind} track:`, e);
3455
3489
  }
@@ -3459,10 +3493,8 @@
3459
3493
  console.error('Error stopping main stream:', e);
3460
3494
  }
3461
3495
  }
3462
- console.log("All streams should be stopped now");
3463
3496
  }
3464
3497
  destroy() {
3465
- console.log("Starting destroy process...");
3466
3498
  this.forceStopAllStreams();
3467
3499
  if (this._soundMeter) {
3468
3500
  this._soundMeter.detach();
@@ -3483,7 +3515,7 @@
3483
3515
  console.error('Error removing event listeners:', e);
3484
3516
  }
3485
3517
  this._publishState = exports.PublishState.NOT_INITIALIZED;
3486
- console.log("Destroy process completed");
3518
+ if (this._restartTimer != null) clearInterval(this._restartTimer);
3487
3519
  }
3488
3520
  }
3489
3521
 
@@ -3785,8 +3817,8 @@
3785
3817
  constructor(streamConfig, autoInitialize = false) {
3786
3818
  super();
3787
3819
  this.DEV_MODE = true;
3788
- this.STREAMER_VERSION = "0.9.0-beta.5";
3789
- this.COMPILE_DATE = "12/10/2024, 10:26:02 AM";
3820
+ this.STREAMER_VERSION = "0.9.0-beta.7";
3821
+ this.COMPILE_DATE = "1/2/2025, 1:53:45 AM";
3790
3822
  this.STREAMER_BRANCH = "Experimental";
3791
3823
  this.STREAMER_PROTOCOL_VERSION = 1;
3792
3824
  this._initialized = false;
@@ -3940,11 +3972,12 @@
3940
3972
  }
3941
3973
  publish(streamKey) {
3942
3974
  var _a, _b;
3975
+ console.log("gonzo daje publish");
3943
3976
  return (_b = (_a = this._playbackController) === null || _a === void 0 ? void 0 : _a.publish(streamKey)) !== null && _b !== void 0 ? _b : false;
3944
3977
  }
3945
3978
  getDeviceState() {
3946
3979
  var _a, _b;
3947
- return (_b = (_a = this._playbackController) === null || _a === void 0 ? void 0 : _a.getInputDeviceState()) !== null && _b !== void 0 ? _b : InputDeviceState.NOT_INITIALIZED;
3980
+ return (_b = (_a = this._playbackController) === null || _a === void 0 ? void 0 : _a.getInputDeviceState()) !== null && _b !== void 0 ? _b : exports.DevicesState.NOT_INITIALIZED;
3948
3981
  }
3949
3982
  clearSavedDevices() {
3950
3983
  var _a;