@stream-io/video-client 1.13.1 → 1.15.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 +14 -0
- package/dist/index.browser.es.js +1704 -1762
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +1706 -1780
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1704 -1762
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +61 -30
- package/dist/src/StreamSfuClient.d.ts +4 -5
- package/dist/src/devices/CameraManager.d.ts +5 -8
- package/dist/src/devices/InputMediaDeviceManager.d.ts +5 -5
- package/dist/src/devices/MicrophoneManager.d.ts +7 -2
- package/dist/src/devices/ScreenShareManager.d.ts +1 -2
- package/dist/src/gen/coordinator/index.d.ts +904 -515
- package/dist/src/gen/video/sfu/event/events.d.ts +38 -19
- package/dist/src/gen/video/sfu/models/models.d.ts +76 -9
- package/dist/src/helpers/array.d.ts +7 -0
- package/dist/src/permissions/PermissionsContext.d.ts +6 -0
- package/dist/src/rtc/BasePeerConnection.d.ts +90 -0
- package/dist/src/rtc/Dispatcher.d.ts +0 -1
- package/dist/src/rtc/IceTrickleBuffer.d.ts +3 -2
- package/dist/src/rtc/Publisher.d.ts +32 -86
- package/dist/src/rtc/Subscriber.d.ts +4 -56
- package/dist/src/rtc/TransceiverCache.d.ts +55 -0
- package/dist/src/rtc/codecs.d.ts +1 -15
- package/dist/src/rtc/helpers/sdp.d.ts +8 -0
- package/dist/src/rtc/helpers/tracks.d.ts +1 -0
- package/dist/src/rtc/index.d.ts +3 -0
- package/dist/src/rtc/videoLayers.d.ts +11 -25
- package/dist/src/stats/{stateStoreStatsReporter.d.ts → CallStateStatsReporter.d.ts} +5 -1
- package/dist/src/stats/SfuStatsReporter.d.ts +4 -2
- package/dist/src/stats/index.d.ts +1 -1
- package/dist/src/stats/types.d.ts +8 -0
- package/dist/src/store/CallState.d.ts +47 -5
- package/dist/src/store/rxUtils.d.ts +15 -1
- package/dist/src/types.d.ts +26 -22
- package/package.json +1 -1
- package/src/Call.ts +310 -271
- package/src/StreamSfuClient.ts +9 -14
- package/src/StreamVideoClient.ts +1 -1
- package/src/__tests__/Call.publishing.test.ts +306 -0
- package/src/devices/CameraManager.ts +33 -16
- package/src/devices/InputMediaDeviceManager.ts +36 -27
- package/src/devices/MicrophoneManager.ts +29 -8
- package/src/devices/ScreenShareManager.ts +6 -8
- package/src/devices/__tests__/CameraManager.test.ts +111 -14
- package/src/devices/__tests__/InputMediaDeviceManager.test.ts +4 -4
- package/src/devices/__tests__/MicrophoneManager.test.ts +59 -21
- package/src/devices/__tests__/ScreenShareManager.test.ts +5 -5
- package/src/devices/__tests__/mocks.ts +1 -0
- package/src/events/__tests__/internal.test.ts +132 -0
- package/src/events/__tests__/mutes.test.ts +0 -3
- package/src/events/__tests__/speaker.test.ts +92 -0
- package/src/events/participant.ts +3 -4
- package/src/gen/coordinator/index.ts +902 -514
- package/src/gen/video/sfu/event/events.ts +91 -30
- package/src/gen/video/sfu/models/models.ts +105 -13
- package/src/helpers/array.ts +14 -0
- package/src/permissions/PermissionsContext.ts +22 -0
- package/src/permissions/__tests__/PermissionsContext.test.ts +40 -0
- package/src/rpc/__tests__/createClient.test.ts +38 -0
- package/src/rpc/createClient.ts +11 -5
- package/src/rtc/BasePeerConnection.ts +240 -0
- package/src/rtc/Dispatcher.ts +0 -9
- package/src/rtc/IceTrickleBuffer.ts +24 -4
- package/src/rtc/Publisher.ts +210 -528
- package/src/rtc/Subscriber.ts +26 -200
- package/src/rtc/TransceiverCache.ts +120 -0
- package/src/rtc/__tests__/Publisher.test.ts +407 -210
- package/src/rtc/__tests__/Subscriber.test.ts +88 -36
- package/src/rtc/__tests__/mocks/webrtc.mocks.ts +22 -2
- package/src/rtc/__tests__/videoLayers.test.ts +161 -54
- package/src/rtc/codecs.ts +1 -131
- package/src/rtc/helpers/__tests__/rtcConfiguration.test.ts +34 -0
- package/src/rtc/helpers/__tests__/sdp.test.ts +59 -0
- package/src/rtc/helpers/sdp.ts +30 -0
- package/src/rtc/helpers/tracks.ts +3 -0
- package/src/rtc/index.ts +4 -0
- package/src/rtc/videoLayers.ts +68 -76
- package/src/stats/{stateStoreStatsReporter.ts → CallStateStatsReporter.ts} +58 -27
- package/src/stats/SfuStatsReporter.ts +31 -3
- package/src/stats/index.ts +1 -1
- package/src/stats/types.ts +12 -0
- package/src/store/CallState.ts +115 -5
- package/src/store/__tests__/CallState.test.ts +101 -0
- package/src/store/rxUtils.ts +23 -1
- package/src/types.ts +27 -22
- package/dist/src/helpers/sdp-munging.d.ts +0 -24
- package/dist/src/rtc/bitrateLookup.d.ts +0 -2
- package/dist/src/rtc/helpers/iceCandidate.d.ts +0 -2
- package/src/helpers/__tests__/hq-audio-sdp.ts +0 -332
- package/src/helpers/__tests__/sdp-munging.test.ts +0 -283
- package/src/helpers/sdp-munging.ts +0 -265
- package/src/rtc/__tests__/bitrateLookup.test.ts +0 -12
- package/src/rtc/__tests__/codecs.test.ts +0 -145
- package/src/rtc/bitrateLookup.ts +0 -61
- package/src/rtc/helpers/iceCandidate.ts +0 -16
- /package/dist/src/{compatibility.d.ts → helpers/compatibility.d.ts} +0 -0
- /package/src/{compatibility.ts → helpers/compatibility.ts} +0 -0
package/dist/src/Call.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Publisher, Subscriber } from './rtc';
|
|
2
2
|
import { CallState } from './store';
|
|
3
|
-
import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CollectUserFeedbackResponse, EndCallResponse, GetCallResponse, GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopHLSBroadcastingResponse, StopLiveResponse, StopRecordingResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse,
|
|
4
|
-
import { AudioTrackType, CallConstructor, CallLeaveOptions,
|
|
3
|
+
import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackResponse, EndCallResponse, GetCallResponse, GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveResponse, StopRecordingResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse, VideoDimension } from './gen/coordinator';
|
|
4
|
+
import { AudioTrackType, CallConstructor, CallLeaveOptions, ClientPublishOptions, ClosedCaptionsSettings, JoinCallData, TrackMuteType, VideoTrackType } from './types';
|
|
5
5
|
import { TrackType } from './gen/video/sfu/models/models';
|
|
6
6
|
import { DynascaleManager } from './helpers/DynascaleManager';
|
|
7
7
|
import { PermissionsContext } from './permissions';
|
|
@@ -69,7 +69,8 @@ export declare class Call {
|
|
|
69
69
|
* @private
|
|
70
70
|
*/
|
|
71
71
|
private readonly dispatcher;
|
|
72
|
-
private
|
|
72
|
+
private clientPublishOptions?;
|
|
73
|
+
private currentPublishOptions?;
|
|
73
74
|
private statsReporter?;
|
|
74
75
|
private sfuStatsReporter?;
|
|
75
76
|
private dropTimeout;
|
|
@@ -210,6 +211,18 @@ export declare class Call {
|
|
|
210
211
|
* @internal
|
|
211
212
|
*/
|
|
212
213
|
private getReconnectDetails;
|
|
214
|
+
/**
|
|
215
|
+
* Prepares the preferred codec for the call.
|
|
216
|
+
* This is an experimental client feature and subject to change.
|
|
217
|
+
* @internal
|
|
218
|
+
*/
|
|
219
|
+
private getPreferredPublishOptions;
|
|
220
|
+
/**
|
|
221
|
+
* Prepares the preferred options for subscribing to tracks.
|
|
222
|
+
* This is an experimental client feature and subject to change.
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
private getPreferredSubscribeOptions;
|
|
213
226
|
/**
|
|
214
227
|
* Performs an ICE restart on both the Publisher and Subscriber Peer Connections.
|
|
215
228
|
* Uses the provided SFU client to restore the ICE connection.
|
|
@@ -282,48 +295,47 @@ export declare class Call {
|
|
|
282
295
|
private restoreSubscribedTracks;
|
|
283
296
|
/**
|
|
284
297
|
* Starts publishing the given video stream to the call.
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* Consecutive calls to this method will replace the previously published stream.
|
|
288
|
-
* The previous video stream will be stopped.
|
|
289
|
-
*
|
|
290
|
-
* @param videoStream the video stream to publish.
|
|
298
|
+
* @deprecated use `call.publish()`.
|
|
291
299
|
*/
|
|
292
300
|
publishVideoStream: (videoStream: MediaStream) => Promise<void>;
|
|
293
301
|
/**
|
|
294
302
|
* Starts publishing the given audio stream to the call.
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
* Consecutive calls to this method will replace the audio stream that is currently being published.
|
|
298
|
-
* The previous audio stream will be stopped.
|
|
299
|
-
*
|
|
300
|
-
* @param audioStream the audio stream to publish.
|
|
303
|
+
* @deprecated use `call.publish()`
|
|
301
304
|
*/
|
|
302
305
|
publishAudioStream: (audioStream: MediaStream) => Promise<void>;
|
|
303
306
|
/**
|
|
304
307
|
* Starts publishing the given screen-share stream to the call.
|
|
305
|
-
*
|
|
306
|
-
* Consecutive calls to this method will replace the previous screen-share stream.
|
|
307
|
-
* The previous screen-share stream will be stopped.
|
|
308
|
-
*
|
|
309
|
-
* @param screenShareStream the screen-share stream to publish.
|
|
308
|
+
* @deprecated use `call.publish()`
|
|
310
309
|
*/
|
|
311
310
|
publishScreenShareStream: (screenShareStream: MediaStream) => Promise<void>;
|
|
311
|
+
/**
|
|
312
|
+
* Publishes the given media stream.
|
|
313
|
+
*
|
|
314
|
+
* @param mediaStream the media stream to publish.
|
|
315
|
+
* @param trackType the type of the track to announce.
|
|
316
|
+
*/
|
|
317
|
+
publish: (mediaStream: MediaStream, trackType: TrackType) => Promise<void>;
|
|
312
318
|
/**
|
|
313
319
|
* Stops publishing the given track type to the call, if it is currently being published.
|
|
314
|
-
* Underlying track will be stopped and removed from the publisher.
|
|
315
320
|
*
|
|
316
|
-
* @param
|
|
317
|
-
|
|
321
|
+
* @param trackTypes the track types to stop publishing.
|
|
322
|
+
*/
|
|
323
|
+
stopPublish: (...trackTypes: TrackType[]) => Promise<void>;
|
|
324
|
+
/**
|
|
325
|
+
* Updates the call state with the new stream.
|
|
326
|
+
*
|
|
327
|
+
* @param mediaStream the new stream to update the call state with.
|
|
328
|
+
* If undefined, the stream will be removed from the call state.
|
|
329
|
+
* @param trackTypes the track types to update the call state with.
|
|
318
330
|
*/
|
|
319
|
-
|
|
331
|
+
private updateLocalStreamState;
|
|
320
332
|
/**
|
|
321
333
|
* Updates the preferred publishing options
|
|
322
334
|
*
|
|
323
335
|
* @internal
|
|
324
336
|
* @param options the options to use.
|
|
325
337
|
*/
|
|
326
|
-
updatePublishOptions(options:
|
|
338
|
+
updatePublishOptions: (options: ClientPublishOptions) => void;
|
|
327
339
|
/**
|
|
328
340
|
* Notifies the SFU that a noise cancellation process has started.
|
|
329
341
|
*
|
|
@@ -336,6 +348,11 @@ export declare class Call {
|
|
|
336
348
|
* @internal
|
|
337
349
|
*/
|
|
338
350
|
notifyNoiseCancellationStopped: () => Promise<void | import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<import("./gen/video/sfu/signal_rpc/signal").StopNoiseCancellationRequest, import("./gen/video/sfu/signal_rpc/signal").StopNoiseCancellationResponse> | undefined>;
|
|
351
|
+
/**
|
|
352
|
+
* Notifies the SFU about the mute state of the given track types.
|
|
353
|
+
* @internal
|
|
354
|
+
*/
|
|
355
|
+
notifyTrackMuteState: (muted: boolean, ...trackTypes: TrackType[]) => Promise<void>;
|
|
339
356
|
/**
|
|
340
357
|
* Will enhance the reported stats with additional participant-specific information (`callStatsReport$` state [store variable](./StreamVideoClient.md/#readonlystatestore)).
|
|
341
358
|
* This is usually helpful when detailed stats for a specific participant are needed.
|
|
@@ -424,7 +441,23 @@ export declare class Call {
|
|
|
424
441
|
*/
|
|
425
442
|
stopTranscription: () => Promise<StopTranscriptionResponse>;
|
|
426
443
|
/**
|
|
427
|
-
*
|
|
444
|
+
* Starts the closed captions of the call.
|
|
445
|
+
*/
|
|
446
|
+
startClosedCaptions: (options?: StartClosedCaptionsRequest) => Promise<StartClosedCaptionsResponse>;
|
|
447
|
+
/**
|
|
448
|
+
* Stops the closed captions of the call.
|
|
449
|
+
*/
|
|
450
|
+
stopClosedCaptions: (options?: StopClosedCaptionsRequest) => Promise<StopClosedCaptionsResponse>;
|
|
451
|
+
/**
|
|
452
|
+
* Updates the closed caption settings.
|
|
453
|
+
*
|
|
454
|
+
* @param config the closed caption settings to apply
|
|
455
|
+
*/
|
|
456
|
+
updateClosedCaptionSettings: (config: Partial<ClosedCaptionsSettings>) => void;
|
|
457
|
+
/**
|
|
458
|
+
* Sends a `call.permission_request` event to all users connected to the call.
|
|
459
|
+
* The call settings object contains information about which permissions can be requested during a call
|
|
460
|
+
* (for example, a user might be allowed to request permission to publish audio, but not video).
|
|
428
461
|
*/
|
|
429
462
|
requestPermissions: (data: RequestPermissionRequest) => Promise<RequestPermissionResponse>;
|
|
430
463
|
/**
|
|
@@ -592,9 +625,7 @@ export declare class Call {
|
|
|
592
625
|
*
|
|
593
626
|
* @internal
|
|
594
627
|
*/
|
|
595
|
-
applyDeviceConfig: (
|
|
596
|
-
private initCamera;
|
|
597
|
-
private initMic;
|
|
628
|
+
applyDeviceConfig: (settings: CallSettingsResponse, publish: boolean) => Promise<void>;
|
|
598
629
|
/**
|
|
599
630
|
* Will begin tracking the given element for visibility changes within the
|
|
600
631
|
* configured viewport element (`call.setViewport`).
|
|
@@ -656,7 +687,7 @@ export declare class Call {
|
|
|
656
687
|
* @param sessionIds optionally specify session ids of the participants this
|
|
657
688
|
* preference has effect on. Affects all participants by default.
|
|
658
689
|
*/
|
|
659
|
-
setPreferredIncomingVideoResolution: (resolution:
|
|
690
|
+
setPreferredIncomingVideoResolution: (resolution: VideoDimension | undefined, sessionIds?: string[]) => void;
|
|
660
691
|
/**
|
|
661
692
|
* Enables or disables incoming video from all remote call participants,
|
|
662
693
|
* and removes any preference for preferred resolution.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dispatcher, IceTrickleBuffer } from './rtc';
|
|
2
2
|
import { JoinRequest, JoinResponse } from './gen/video/sfu/event/events';
|
|
3
|
-
import { ICERestartRequest, SendAnswerRequest, SendStatsRequest, SetPublisherRequest,
|
|
4
|
-
import { ICETrickle
|
|
3
|
+
import { ICERestartRequest, SendAnswerRequest, SendStatsRequest, SetPublisherRequest, TrackMuteState, TrackSubscriptionDetails } from './gen/video/sfu/signal_rpc/signal';
|
|
4
|
+
import { ICETrickle } from './gen/video/sfu/models/models';
|
|
5
5
|
import { StreamClient } from './coordinator/connection/client';
|
|
6
6
|
import { Credentials } from './gen/coordinator';
|
|
7
7
|
export type StreamSfuClientConstructor = {
|
|
@@ -122,15 +122,14 @@ export declare class StreamSfuClient {
|
|
|
122
122
|
get joinTask(): Promise<JoinResponse>;
|
|
123
123
|
private handleWebSocketClose;
|
|
124
124
|
close: (code?: number, reason?: string) => void;
|
|
125
|
-
dispose
|
|
125
|
+
private dispose;
|
|
126
126
|
leaveAndClose: (reason: string) => Promise<void>;
|
|
127
127
|
updateSubscriptions: (tracks: TrackSubscriptionDetails[]) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<import("./gen/video/sfu/signal_rpc/signal").UpdateSubscriptionsRequest, import("./gen/video/sfu/signal_rpc/signal").UpdateSubscriptionsResponse>>;
|
|
128
128
|
setPublisher: (data: Omit<SetPublisherRequest, "sessionId">) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<SetPublisherRequest, import("./gen/video/sfu/signal_rpc/signal").SetPublisherResponse>>;
|
|
129
129
|
sendAnswer: (data: Omit<SendAnswerRequest, "sessionId">) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<SendAnswerRequest, import("./gen/video/sfu/signal_rpc/signal").SendAnswerResponse>>;
|
|
130
130
|
iceTrickle: (data: Omit<ICETrickle, "sessionId">) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<ICETrickle, import("./gen/video/sfu/signal_rpc/signal").ICETrickleResponse>>;
|
|
131
131
|
iceRestart: (data: Omit<ICERestartRequest, "sessionId">) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<ICERestartRequest, import("./gen/video/sfu/signal_rpc/signal").ICERestartResponse>>;
|
|
132
|
-
|
|
133
|
-
updateMuteStates: (data: Omit<UpdateMuteStatesRequest, "sessionId">) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<UpdateMuteStatesRequest, import("./gen/video/sfu/signal_rpc/signal").UpdateMuteStatesResponse>>;
|
|
132
|
+
updateMuteStates: (muteStates: TrackMuteState[]) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<import("./gen/video/sfu/signal_rpc/signal").UpdateMuteStatesRequest, import("./gen/video/sfu/signal_rpc/signal").UpdateMuteStatesResponse>>;
|
|
134
133
|
sendStats: (stats: Omit<SendStatsRequest, "sessionId">) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<SendStatsRequest, import("./gen/video/sfu/signal_rpc/signal").SendStatsResponse>>;
|
|
135
134
|
startNoiseCancellation: () => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<import("./gen/video/sfu/signal_rpc/signal").StartNoiseCancellationRequest, import("./gen/video/sfu/signal_rpc/signal").StartNoiseCancellationResponse>>;
|
|
136
135
|
stopNoiseCancellation: () => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<import("./gen/video/sfu/signal_rpc/signal").StopNoiseCancellationRequest, import("./gen/video/sfu/signal_rpc/signal").StopNoiseCancellationResponse>>;
|
|
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { Call } from '../Call';
|
|
3
3
|
import { CameraDirection, CameraManagerState } from './CameraManagerState';
|
|
4
4
|
import { InputMediaDeviceManager } from './InputMediaDeviceManager';
|
|
5
|
-
import {
|
|
5
|
+
import { VideoSettingsResponse } from '../gen/coordinator';
|
|
6
6
|
export declare class CameraManager extends InputMediaDeviceManager<CameraManagerState> {
|
|
7
7
|
private targetResolution;
|
|
8
8
|
/**
|
|
@@ -33,15 +33,12 @@ export declare class CameraManager extends InputMediaDeviceManager<CameraManager
|
|
|
33
33
|
height: number;
|
|
34
34
|
}): Promise<void>;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Applies the video settings to the camera.
|
|
37
37
|
*
|
|
38
|
-
* @
|
|
39
|
-
* @
|
|
40
|
-
* @param codec the codec to use for encoding the video.
|
|
38
|
+
* @param settings the video settings to apply.
|
|
39
|
+
* @param publish whether to publish the stream after applying the settings.
|
|
41
40
|
*/
|
|
42
|
-
|
|
41
|
+
apply(settings: VideoSettingsResponse, publish: boolean): Promise<void>;
|
|
43
42
|
protected getDevices(): Observable<MediaDeviceInfo[]>;
|
|
44
43
|
protected getStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
45
|
-
protected publishStream(stream: MediaStream): Promise<void>;
|
|
46
|
-
protected stopPublishStream(stopTracks: boolean): Promise<void>;
|
|
47
44
|
}
|
|
@@ -85,16 +85,16 @@ export declare abstract class InputMediaDeviceManager<T extends InputMediaDevice
|
|
|
85
85
|
protected applySettingsToStream(): Promise<void>;
|
|
86
86
|
protected abstract getDevices(): Observable<MediaDeviceInfo[]>;
|
|
87
87
|
protected abstract getStream(constraints: C): Promise<MediaStream>;
|
|
88
|
-
protected
|
|
89
|
-
protected
|
|
88
|
+
protected publishStream(stream: MediaStream): Promise<void>;
|
|
89
|
+
protected stopPublishStream(): Promise<void>;
|
|
90
90
|
protected getTracks(): MediaStreamTrack[];
|
|
91
91
|
protected muteStream(stopTracks?: boolean): Promise<void>;
|
|
92
|
-
private
|
|
93
|
-
private
|
|
92
|
+
private disableTracks;
|
|
93
|
+
private enableTracks;
|
|
94
94
|
private stopTracks;
|
|
95
95
|
private muteLocalStream;
|
|
96
96
|
protected unmuteStream(): Promise<void>;
|
|
97
97
|
private get mediaDeviceKind();
|
|
98
98
|
private handleDisconnectedOrReplacedDevices;
|
|
99
|
-
private
|
|
99
|
+
private findDevice;
|
|
100
100
|
}
|
|
@@ -4,6 +4,7 @@ import { Call } from '../Call';
|
|
|
4
4
|
import { InputMediaDeviceManager } from './InputMediaDeviceManager';
|
|
5
5
|
import { MicrophoneManagerState } from './MicrophoneManagerState';
|
|
6
6
|
import { TrackDisableMode } from './InputMediaDeviceManagerState';
|
|
7
|
+
import { AudioSettingsResponse } from '../gen/coordinator';
|
|
7
8
|
export declare class MicrophoneManager extends InputMediaDeviceManager<MicrophoneManagerState> {
|
|
8
9
|
private speakingWhileMutedNotificationEnabled;
|
|
9
10
|
private soundDetectorConcurrencyTag;
|
|
@@ -35,10 +36,14 @@ export declare class MicrophoneManager extends InputMediaDeviceManager<Microphon
|
|
|
35
36
|
* Disables speaking while muted notification.
|
|
36
37
|
*/
|
|
37
38
|
disableSpeakingWhileMutedNotification(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Applies the audio settings to the microphone.
|
|
41
|
+
* @param settings the audio settings to apply.
|
|
42
|
+
* @param publish whether to publish the stream after applying the settings.
|
|
43
|
+
*/
|
|
44
|
+
apply(settings: AudioSettingsResponse, publish: boolean): Promise<void>;
|
|
38
45
|
protected getDevices(): Observable<MediaDeviceInfo[]>;
|
|
39
46
|
protected getStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
|
|
40
|
-
protected publishStream(stream: MediaStream): Promise<void>;
|
|
41
|
-
protected stopPublishStream(stopTracks: boolean): Promise<void>;
|
|
42
47
|
private startSpeakingWhileMutedDetection;
|
|
43
48
|
private stopSpeakingWhileMutedDetection;
|
|
44
49
|
}
|
|
@@ -28,8 +28,7 @@ export declare class ScreenShareManager extends InputMediaDeviceManager<ScreenSh
|
|
|
28
28
|
setSettings(settings: ScreenShareSettings | undefined): void;
|
|
29
29
|
protected getDevices(): Observable<MediaDeviceInfo[]>;
|
|
30
30
|
protected getStream(constraints: DisplayMediaStreamOptions): Promise<MediaStream>;
|
|
31
|
-
protected
|
|
32
|
-
protected stopPublishStream(stopTracks: boolean): Promise<void>;
|
|
31
|
+
protected stopPublishStream(): Promise<void>;
|
|
33
32
|
/**
|
|
34
33
|
* Overrides the default `select` method to throw an error.
|
|
35
34
|
*
|