@stream-io/video-client 1.12.4 → 1.13.0
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 +7 -0
- package/dist/index.browser.es.js +66 -4
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +68 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +66 -4
- package/dist/index.es.js.map +1 -1
- package/dist/src/client-details.d.ts +11 -0
- package/package.json +1 -1
- package/src/client-details.ts +80 -0
- package/src/stats/SfuStatsReporter.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.13.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.12.4...@stream-io/video-client-1.13.0) (2024-12-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* report low power mode and thermal info to stats ([#1583](https://github.com/GetStream/stream-video-js/issues/1583)) ([ef49cee](https://github.com/GetStream/stream-video-js/commit/ef49ceef032fc3e4bb055fbc32c2b5b18c3a24d2))
|
|
11
|
+
|
|
5
12
|
## [1.12.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.12.3...@stream-io/video-client-1.12.4) (2024-12-17)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -3299,7 +3299,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3299
3299
|
return result;
|
|
3300
3300
|
};
|
|
3301
3301
|
|
|
3302
|
-
const version = "1.
|
|
3302
|
+
const version = "1.13.0";
|
|
3303
3303
|
const [major, minor, patch] = version.split('.');
|
|
3304
3304
|
let sdkInfo = {
|
|
3305
3305
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -3310,6 +3310,7 @@ let sdkInfo = {
|
|
|
3310
3310
|
let osInfo;
|
|
3311
3311
|
let deviceInfo;
|
|
3312
3312
|
let webRtcInfo;
|
|
3313
|
+
let deviceState;
|
|
3313
3314
|
const setSdkInfo = (info) => {
|
|
3314
3315
|
sdkInfo = info;
|
|
3315
3316
|
};
|
|
@@ -3334,6 +3335,67 @@ const getWebRTCInfo = () => {
|
|
|
3334
3335
|
const setWebRTCInfo = (info) => {
|
|
3335
3336
|
webRtcInfo = info;
|
|
3336
3337
|
};
|
|
3338
|
+
const setThermalState = (state) => {
|
|
3339
|
+
if (!osInfo) {
|
|
3340
|
+
deviceState = { oneofKind: undefined };
|
|
3341
|
+
return;
|
|
3342
|
+
}
|
|
3343
|
+
if (osInfo.name === 'android') {
|
|
3344
|
+
const thermalState = AndroidThermalState[state] ||
|
|
3345
|
+
AndroidThermalState.UNSPECIFIED;
|
|
3346
|
+
deviceState = {
|
|
3347
|
+
oneofKind: 'android',
|
|
3348
|
+
android: {
|
|
3349
|
+
thermalState,
|
|
3350
|
+
isPowerSaverMode: deviceState?.oneofKind === 'android' &&
|
|
3351
|
+
deviceState.android.isPowerSaverMode,
|
|
3352
|
+
},
|
|
3353
|
+
};
|
|
3354
|
+
}
|
|
3355
|
+
if (osInfo.name.toLowerCase() === 'ios') {
|
|
3356
|
+
const thermalState = AppleThermalState[state] ||
|
|
3357
|
+
AppleThermalState.UNSPECIFIED;
|
|
3358
|
+
deviceState = {
|
|
3359
|
+
oneofKind: 'apple',
|
|
3360
|
+
apple: {
|
|
3361
|
+
thermalState,
|
|
3362
|
+
isLowPowerModeEnabled: deviceState?.oneofKind === 'apple' &&
|
|
3363
|
+
deviceState.apple.isLowPowerModeEnabled,
|
|
3364
|
+
},
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
};
|
|
3368
|
+
const setPowerState = (powerMode) => {
|
|
3369
|
+
if (!osInfo) {
|
|
3370
|
+
deviceState = { oneofKind: undefined };
|
|
3371
|
+
return;
|
|
3372
|
+
}
|
|
3373
|
+
if (osInfo.name === 'android') {
|
|
3374
|
+
deviceState = {
|
|
3375
|
+
oneofKind: 'android',
|
|
3376
|
+
android: {
|
|
3377
|
+
thermalState: deviceState?.oneofKind === 'android'
|
|
3378
|
+
? deviceState.android.thermalState
|
|
3379
|
+
: AndroidThermalState.UNSPECIFIED,
|
|
3380
|
+
isPowerSaverMode: powerMode,
|
|
3381
|
+
},
|
|
3382
|
+
};
|
|
3383
|
+
}
|
|
3384
|
+
if (osInfo.name.toLowerCase() === 'ios') {
|
|
3385
|
+
deviceState = {
|
|
3386
|
+
oneofKind: 'apple',
|
|
3387
|
+
apple: {
|
|
3388
|
+
thermalState: deviceState?.oneofKind === 'apple'
|
|
3389
|
+
? deviceState.apple.thermalState
|
|
3390
|
+
: AppleThermalState.UNSPECIFIED,
|
|
3391
|
+
isLowPowerModeEnabled: powerMode,
|
|
3392
|
+
},
|
|
3393
|
+
};
|
|
3394
|
+
}
|
|
3395
|
+
};
|
|
3396
|
+
const getDeviceState = () => {
|
|
3397
|
+
return deviceState;
|
|
3398
|
+
};
|
|
3337
3399
|
const getClientDetails = () => {
|
|
3338
3400
|
if (isReactNative()) {
|
|
3339
3401
|
// Since RN doesn't support web, sharing browser info is not required
|
|
@@ -7625,7 +7687,7 @@ class SfuStatsReporter {
|
|
|
7625
7687
|
publisherStats,
|
|
7626
7688
|
audioDevices: this.inputDevices.get('mic'),
|
|
7627
7689
|
videoDevices: this.inputDevices.get('camera'),
|
|
7628
|
-
deviceState:
|
|
7690
|
+
deviceState: getDeviceState(),
|
|
7629
7691
|
telemetry: telemetryData,
|
|
7630
7692
|
});
|
|
7631
7693
|
};
|
|
@@ -12832,7 +12894,7 @@ class StreamClient {
|
|
|
12832
12894
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12833
12895
|
};
|
|
12834
12896
|
this.getUserAgent = () => {
|
|
12835
|
-
const version = "1.
|
|
12897
|
+
const version = "1.13.0";
|
|
12836
12898
|
return (this.userAgent ||
|
|
12837
12899
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12838
12900
|
};
|
|
@@ -13341,5 +13403,5 @@ class StreamVideoClient {
|
|
|
13341
13403
|
}
|
|
13342
13404
|
StreamVideoClient._instanceMap = new Map();
|
|
13343
13405
|
|
|
13344
|
-
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, BlockListOptionsBehaviorEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, ChannelConfigWithInfoAutomodBehaviorEnum, ChannelConfigWithInfoAutomodEnum, ChannelConfigWithInfoBlocklistBehaviorEnum, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogLevel, getLogger, getOSInfo, 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, setSdkInfo, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
13406
|
+
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, BlockListOptionsBehaviorEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, ChannelConfigWithInfoAutomodBehaviorEnum, ChannelConfigWithInfoAutomodEnum, ChannelConfigWithInfoBlocklistBehaviorEnum, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getDeviceState, getLogLevel, getLogger, getOSInfo, 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 };
|
|
13345
13407
|
//# sourceMappingURL=index.browser.es.js.map
|