@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.
Files changed (99) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/index.browser.es.js +1704 -1762
  3. package/dist/index.browser.es.js.map +1 -1
  4. package/dist/index.cjs.js +1706 -1780
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.es.js +1704 -1762
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/src/Call.d.ts +61 -30
  9. package/dist/src/StreamSfuClient.d.ts +4 -5
  10. package/dist/src/devices/CameraManager.d.ts +5 -8
  11. package/dist/src/devices/InputMediaDeviceManager.d.ts +5 -5
  12. package/dist/src/devices/MicrophoneManager.d.ts +7 -2
  13. package/dist/src/devices/ScreenShareManager.d.ts +1 -2
  14. package/dist/src/gen/coordinator/index.d.ts +904 -515
  15. package/dist/src/gen/video/sfu/event/events.d.ts +38 -19
  16. package/dist/src/gen/video/sfu/models/models.d.ts +76 -9
  17. package/dist/src/helpers/array.d.ts +7 -0
  18. package/dist/src/permissions/PermissionsContext.d.ts +6 -0
  19. package/dist/src/rtc/BasePeerConnection.d.ts +90 -0
  20. package/dist/src/rtc/Dispatcher.d.ts +0 -1
  21. package/dist/src/rtc/IceTrickleBuffer.d.ts +3 -2
  22. package/dist/src/rtc/Publisher.d.ts +32 -86
  23. package/dist/src/rtc/Subscriber.d.ts +4 -56
  24. package/dist/src/rtc/TransceiverCache.d.ts +55 -0
  25. package/dist/src/rtc/codecs.d.ts +1 -15
  26. package/dist/src/rtc/helpers/sdp.d.ts +8 -0
  27. package/dist/src/rtc/helpers/tracks.d.ts +1 -0
  28. package/dist/src/rtc/index.d.ts +3 -0
  29. package/dist/src/rtc/videoLayers.d.ts +11 -25
  30. package/dist/src/stats/{stateStoreStatsReporter.d.ts → CallStateStatsReporter.d.ts} +5 -1
  31. package/dist/src/stats/SfuStatsReporter.d.ts +4 -2
  32. package/dist/src/stats/index.d.ts +1 -1
  33. package/dist/src/stats/types.d.ts +8 -0
  34. package/dist/src/store/CallState.d.ts +47 -5
  35. package/dist/src/store/rxUtils.d.ts +15 -1
  36. package/dist/src/types.d.ts +26 -22
  37. package/package.json +1 -1
  38. package/src/Call.ts +310 -271
  39. package/src/StreamSfuClient.ts +9 -14
  40. package/src/StreamVideoClient.ts +1 -1
  41. package/src/__tests__/Call.publishing.test.ts +306 -0
  42. package/src/devices/CameraManager.ts +33 -16
  43. package/src/devices/InputMediaDeviceManager.ts +36 -27
  44. package/src/devices/MicrophoneManager.ts +29 -8
  45. package/src/devices/ScreenShareManager.ts +6 -8
  46. package/src/devices/__tests__/CameraManager.test.ts +111 -14
  47. package/src/devices/__tests__/InputMediaDeviceManager.test.ts +4 -4
  48. package/src/devices/__tests__/MicrophoneManager.test.ts +59 -21
  49. package/src/devices/__tests__/ScreenShareManager.test.ts +5 -5
  50. package/src/devices/__tests__/mocks.ts +1 -0
  51. package/src/events/__tests__/internal.test.ts +132 -0
  52. package/src/events/__tests__/mutes.test.ts +0 -3
  53. package/src/events/__tests__/speaker.test.ts +92 -0
  54. package/src/events/participant.ts +3 -4
  55. package/src/gen/coordinator/index.ts +902 -514
  56. package/src/gen/video/sfu/event/events.ts +91 -30
  57. package/src/gen/video/sfu/models/models.ts +105 -13
  58. package/src/helpers/array.ts +14 -0
  59. package/src/permissions/PermissionsContext.ts +22 -0
  60. package/src/permissions/__tests__/PermissionsContext.test.ts +40 -0
  61. package/src/rpc/__tests__/createClient.test.ts +38 -0
  62. package/src/rpc/createClient.ts +11 -5
  63. package/src/rtc/BasePeerConnection.ts +240 -0
  64. package/src/rtc/Dispatcher.ts +0 -9
  65. package/src/rtc/IceTrickleBuffer.ts +24 -4
  66. package/src/rtc/Publisher.ts +210 -528
  67. package/src/rtc/Subscriber.ts +26 -200
  68. package/src/rtc/TransceiverCache.ts +120 -0
  69. package/src/rtc/__tests__/Publisher.test.ts +407 -210
  70. package/src/rtc/__tests__/Subscriber.test.ts +88 -36
  71. package/src/rtc/__tests__/mocks/webrtc.mocks.ts +22 -2
  72. package/src/rtc/__tests__/videoLayers.test.ts +161 -54
  73. package/src/rtc/codecs.ts +1 -131
  74. package/src/rtc/helpers/__tests__/rtcConfiguration.test.ts +34 -0
  75. package/src/rtc/helpers/__tests__/sdp.test.ts +59 -0
  76. package/src/rtc/helpers/sdp.ts +30 -0
  77. package/src/rtc/helpers/tracks.ts +3 -0
  78. package/src/rtc/index.ts +4 -0
  79. package/src/rtc/videoLayers.ts +68 -76
  80. package/src/stats/{stateStoreStatsReporter.ts → CallStateStatsReporter.ts} +58 -27
  81. package/src/stats/SfuStatsReporter.ts +31 -3
  82. package/src/stats/index.ts +1 -1
  83. package/src/stats/types.ts +12 -0
  84. package/src/store/CallState.ts +115 -5
  85. package/src/store/__tests__/CallState.test.ts +101 -0
  86. package/src/store/rxUtils.ts +23 -1
  87. package/src/types.ts +27 -22
  88. package/dist/src/helpers/sdp-munging.d.ts +0 -24
  89. package/dist/src/rtc/bitrateLookup.d.ts +0 -2
  90. package/dist/src/rtc/helpers/iceCandidate.d.ts +0 -2
  91. package/src/helpers/__tests__/hq-audio-sdp.ts +0 -332
  92. package/src/helpers/__tests__/sdp-munging.test.ts +0 -283
  93. package/src/helpers/sdp-munging.ts +0 -265
  94. package/src/rtc/__tests__/bitrateLookup.test.ts +0 -12
  95. package/src/rtc/__tests__/codecs.test.ts +0 -145
  96. package/src/rtc/bitrateLookup.ts +0 -61
  97. package/src/rtc/helpers/iceCandidate.ts +0 -16
  98. /package/dist/src/{compatibility.d.ts → helpers/compatibility.d.ts} +0 -0
  99. /package/src/{compatibility.ts → helpers/compatibility.ts} +0 -0
@@ -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, VideoResolution } from './gen/coordinator';
4
- import { AudioTrackType, CallConstructor, CallLeaveOptions, JoinCallData, PublishOptions, TrackMuteType, VideoTrackType } from './types';
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 publishOptions?;
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
- * The stream will be stopped if the user changes an input device, or if the user leaves the call.
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
- * The stream will be stopped if the user changes an input device, or if the user leaves the call.
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 trackType the track type to stop publishing.
317
- * @param stopTrack if `true` the track will be stopped, else it will be just disabled
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
- stopPublish: (trackType: TrackType, stopTrack?: boolean) => Promise<void>;
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: PublishOptions): void;
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
- * Sends a `call.permission_request` event to all users connected to the call. The call settings object contains infomration about which permissions can be requested during a call (for example a user might be allowed to request permission to publish audio, but not video).
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: (status: boolean) => Promise<void>;
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: VideoResolution | undefined, sessionIds?: string[]) => void;
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, TrackSubscriptionDetails, UpdateMuteStatesRequest } from './gen/video/sfu/signal_rpc/signal';
4
- import { ICETrickle, TrackType } from './gen/video/sfu/models/models';
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: () => void;
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
- updateMuteState: (trackType: TrackType, muted: boolean) => Promise<import("@protobuf-ts/runtime-rpc").FinishedUnaryCall<UpdateMuteStatesRequest, import("./gen/video/sfu/signal_rpc/signal").UpdateMuteStatesResponse>>;
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 { PreferredCodec } from '../types';
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
- * Sets the preferred codec for encoding the video.
36
+ * Applies the video settings to the camera.
37
37
  *
38
- * @internal internal use only, not part of the public API.
39
- * @deprecated use {@link call.updatePublishOptions} instead.
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
- setPreferredCodec(codec: PreferredCodec | undefined): void;
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 abstract publishStream(stream: MediaStream): Promise<void>;
89
- protected abstract stopPublishStream(stopTracks: boolean): Promise<void>;
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 muteTracks;
93
- private unmuteTracks;
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 findDeviceInList;
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 publishStream(stream: MediaStream): Promise<void>;
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
  *