@stream-io/video-client 1.25.1 → 1.25.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.25.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.25.1...@stream-io/video-client-1.25.2) (2025-07-02)
6
+
7
+ ### Bug Fixes
8
+
9
+ - resolve `default` device id into real id ([#1839](https://github.com/GetStream/stream-video-js/issues/1839)) ([1a1037f](https://github.com/GetStream/stream-video-js/commit/1a1037f21ef2926c7da78b6461499f37742935e9))
10
+
5
11
  ## [1.25.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.25.0...@stream-io/video-client-1.25.1) (2025-06-30)
6
12
 
7
13
  ### Bug Fixes
@@ -5810,7 +5810,7 @@ const aggregate = (stats) => {
5810
5810
  return report;
5811
5811
  };
5812
5812
 
5813
- const version = "1.25.1";
5813
+ const version = "1.25.2";
5814
5814
  const [major, minor, patch] = version.split('.');
5815
5815
  let sdkInfo = {
5816
5816
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -9667,6 +9667,26 @@ const disposeOfMediaStream = (stream) => {
9667
9667
  stream.release();
9668
9668
  }
9669
9669
  };
9670
+ /**
9671
+ * Resolves `default` device id into the real device id. Some browsers (notably,
9672
+ * Chromium-based) report device with id `default` among audio input and output
9673
+ * devices. Since not every browser does that, we never want `default` id to be
9674
+ * used within our SDK. This function tries to find the real id for the `default`
9675
+ * device.
9676
+ */
9677
+ function resolveDeviceId(deviceId, kind) {
9678
+ if (deviceId !== 'default')
9679
+ return deviceId;
9680
+ const devices = deviceIds$ && getCurrentValue(deviceIds$);
9681
+ if (!devices)
9682
+ return deviceId;
9683
+ const defaultDeviceInfo = devices.find((d) => d.deviceId === deviceId);
9684
+ if (!defaultDeviceInfo)
9685
+ return deviceId;
9686
+ const groupId = defaultDeviceInfo.groupId;
9687
+ const candidates = devices.filter((d) => d.kind === kind && d.deviceId !== 'default' && d.groupId === groupId);
9688
+ return candidates.length === 1 ? candidates[0].deviceId : deviceId;
9689
+ }
9670
9690
 
9671
9691
  /**
9672
9692
  * Checks if the current platform is a mobile device.
@@ -10456,7 +10476,8 @@ class MicrophoneManagerState extends InputMediaDeviceManagerState {
10456
10476
  }
10457
10477
  getDeviceIdFromStream(stream) {
10458
10478
  const [track] = stream.getAudioTracks();
10459
- return track?.getSettings().deviceId;
10479
+ const unresolvedDeviceId = track?.getSettings().deviceId;
10480
+ return resolveDeviceId(unresolvedDeviceId, 'audioinput');
10460
10481
  }
10461
10482
  }
10462
10483
 
@@ -14252,7 +14273,7 @@ class StreamClient {
14252
14273
  this.getUserAgent = () => {
14253
14274
  if (!this.cachedUserAgent) {
14254
14275
  const { clientAppIdentifier = {} } = this.options;
14255
- const { sdkName = 'js', sdkVersion = "1.25.1", ...extras } = clientAppIdentifier;
14276
+ const { sdkName = 'js', sdkVersion = "1.25.2", ...extras } = clientAppIdentifier;
14256
14277
  this.cachedUserAgent = [
14257
14278
  `stream-video-${sdkName}-v${sdkVersion}`,
14258
14279
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
@@ -14805,5 +14826,5 @@ class StreamVideoClient {
14805
14826
  }
14806
14827
  StreamVideoClient._instances = new Map();
14807
14828
 
14808
- export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceState, getLogLevel, getLogger, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
14829
+ export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceState, getLogLevel, getLogger, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
14809
14830
  //# sourceMappingURL=index.browser.es.js.map