@stream-io/video-client 1.25.5 → 1.26.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 +6 -0
- package/dist/index.browser.es.js +21 -10
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +21 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +21 -10
- package/dist/index.es.js.map +1 -1
- package/dist/src/helpers/RNSpeechDetector.d.ts +2 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/helpers/RNSpeechDetector.ts +20 -6
package/dist/index.d.ts
CHANGED
|
@@ -17,5 +17,6 @@ export * from './src/helpers/DynascaleManager';
|
|
|
17
17
|
export * from './src/helpers/ViewportTracker';
|
|
18
18
|
export * from './src/helpers/sound-detector';
|
|
19
19
|
export * from './src/helpers/participantUtils';
|
|
20
|
+
export * from './src/helpers/RNSpeechDetector';
|
|
20
21
|
export * as Browsers from './src/helpers/browsers';
|
|
21
22
|
export * from './src/logger';
|
package/dist/index.es.js
CHANGED
|
@@ -5811,7 +5811,7 @@ const aggregate = (stats) => {
|
|
|
5811
5811
|
return report;
|
|
5812
5812
|
};
|
|
5813
5813
|
|
|
5814
|
-
const version = "1.
|
|
5814
|
+
const version = "1.26.0";
|
|
5815
5815
|
const [major, minor, patch] = version.split('.');
|
|
5816
5816
|
let sdkInfo = {
|
|
5817
5817
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10536,20 +10536,26 @@ const createSoundDetector = (audioStream, onSoundDetectedStateChanged, options =
|
|
|
10536
10536
|
};
|
|
10537
10537
|
|
|
10538
10538
|
class RNSpeechDetector {
|
|
10539
|
-
constructor() {
|
|
10539
|
+
constructor(externalAudioStream) {
|
|
10540
10540
|
this.pc1 = new RTCPeerConnection({});
|
|
10541
10541
|
this.pc2 = new RTCPeerConnection({});
|
|
10542
|
+
this.externalAudioStream = externalAudioStream;
|
|
10542
10543
|
}
|
|
10543
10544
|
/**
|
|
10544
10545
|
* Starts the speech detection.
|
|
10545
10546
|
*/
|
|
10546
10547
|
async start(onSoundDetectedStateChanged) {
|
|
10547
10548
|
try {
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
}
|
|
10552
|
-
|
|
10549
|
+
let audioStream;
|
|
10550
|
+
if (this.externalAudioStream != null) {
|
|
10551
|
+
audioStream = this.externalAudioStream;
|
|
10552
|
+
}
|
|
10553
|
+
else {
|
|
10554
|
+
audioStream = await navigator.mediaDevices.getUserMedia({
|
|
10555
|
+
audio: true,
|
|
10556
|
+
});
|
|
10557
|
+
this.audioStream = audioStream;
|
|
10558
|
+
}
|
|
10553
10559
|
this.pc1.addEventListener('icecandidate', async (e) => {
|
|
10554
10560
|
await this.pc2.addIceCandidate(e.candidate);
|
|
10555
10561
|
});
|
|
@@ -10591,7 +10597,12 @@ class RNSpeechDetector {
|
|
|
10591
10597
|
stop() {
|
|
10592
10598
|
this.pc1.close();
|
|
10593
10599
|
this.pc2.close();
|
|
10594
|
-
this.
|
|
10600
|
+
if (this.externalAudioStream != null) {
|
|
10601
|
+
this.externalAudioStream = undefined;
|
|
10602
|
+
}
|
|
10603
|
+
else {
|
|
10604
|
+
this.cleanupAudioStream();
|
|
10605
|
+
}
|
|
10595
10606
|
}
|
|
10596
10607
|
/**
|
|
10597
10608
|
* Public method that detects the audio levels and returns the status.
|
|
@@ -14283,7 +14294,7 @@ class StreamClient {
|
|
|
14283
14294
|
this.getUserAgent = () => {
|
|
14284
14295
|
if (!this.cachedUserAgent) {
|
|
14285
14296
|
const { clientAppIdentifier = {} } = this.options;
|
|
14286
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
14297
|
+
const { sdkName = 'js', sdkVersion = "1.26.0", ...extras } = clientAppIdentifier;
|
|
14287
14298
|
this.cachedUserAgent = [
|
|
14288
14299
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14289
14300
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -14836,5 +14847,5 @@ class StreamVideoClient {
|
|
|
14836
14847
|
}
|
|
14837
14848
|
StreamVideoClient._instances = new Map();
|
|
14838
14849
|
|
|
14839
|
-
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 };
|
|
14850
|
+
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, RNSpeechDetector, 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 };
|
|
14840
14851
|
//# sourceMappingURL=index.es.js.map
|