Adds an observer to receive callbacks about device changes.
This observer callback will only be called for attendees in Replica meetings.
Indicates that the client is no longer authenticated to the Primary meeting
and can no longer share media. status
will contain a MeetingSessionStatusCode
of the following:
MeetingSessionStatusCode.OK
: demoteFromPrimaryMeeting
was used to remove the attendee.MeetingSessionStatusCode.AudioAuthenticationRejected
: chime::DeleteAttendee
was called on the Primary
meeting attendee used in promoteToPrimaryMeeting
.MeetingSessionStatusCode.AudioVideoDisconnectedWhilePromoted
: The client disconnected (and may be reconnecting).
Any disconnection will trigger an automatic demotion to avoid unexpected or unwanted promotion state on reconnection.Selects an audio output device for use. Null specifies the default device. Note: This method will throw an error if browser does not support setSinkId. See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId
Sets the video input quality parameters to request when enabling video. These settings take effect the next time a video input device is chosen. The default is 960x540 @ 15 fps.
Gets an AnalyserNode
from the current audio input. This node can be used to
generate the display for a mic indicator. null
is returned if no audio
input has been selected.
The AnalyserNode
is not updated automatically when you choose a new
audio input. Dispose of this one and fetch another by calling this method again.
Note that this node should be cleaned up after use, and as such a RemovableAnalyserNode is returned. Call RemovableAnalyserNode.removeOriginalInputs to disconnect the node from the Web Audio graph.
Remove the promoted attendee from the Primary meeting. This client will stop sharing audio, video, and data messages.
This will revert the end-user to precisely the state they were before a call to promoteToPrimaryMeeting
This will have no effect if there was no previous successful call to promoteToPrimaryMeeting
. This
may result in AudioVideoObserver.audioVideoWasDemotedFromPrimaryMeeting
but there is no need to wait for that callback
to revert UX, etc.
Toggle SVC for content share. This should be called before calling startContentShare
or
startContentShareFromScreenCapture
. This will only have impact if using an SVC supporting
codec like VP9. It cannot be enabled at the same time as simulcast.
Toggle simulcast for content share. This should be called before calling startContentShare
or
startContentShareFromScreenCapture
. The default encoding parameters are:
This API will be deprecated in favor of ClientMetricReport.getRTCStatsReport()
.
It makes an additional call to the getStats
API and therefore may cause slight performance degradation.
Please subscribe to metricsDidReceive(clientMetricReport: ClientMetricReport)
callback,
and get the raw RTCStatsReport
via clientMetricReport.getRTCStatsReport()
.
Get all the remote video sending sources.
Get the current video input quality settings to request when enabling video.
Lists currently available audio input devices. If forceUpdate
is set to true, the deviceInfoCache
will be updated from browser.
Lists currently available audio output devices. If forceUpdate
is set to true, the deviceInfoCache
will be updated from browser.
Lists currently available video input devices. If forceUpdate
is set to true, the deviceInfoCache
will be updated from browser.
Mixes the audio from the given media stream into the main audio input stream.
Pause content sharing. This (combined with unpauseContentShare
is a lightweight alternative to stopping and
starting content share which requires use of a seperate peer connection and therefore has increased latency.
Remote receivers will continue to subscribe to content share video but there will be nothing transmitting (e.g. it may be a black frame)
Allows an attendee in a Replica meeting to immediately transition to a Primary meeting attendee without need for reconnection. The promise should always return a session status even upon failure (i.e. it should never reject). See the guide for more information.
The resolved MeetingSessionStatus
will contain a MeetingSessionStatusCode
of the following:
MeetingSessionStatusCode.OK
: The promotion was successful (i.e. session token was valid,
there was room in the Primary meeting, etc.), audio will begin flowing
and the attendee can begin to send data messages, and content/video if the call is not already at limit.MeetingSessionStatusCode.AudioAuthenticationRejected
: Credentials provided
were invalid when connection attempted to Primary meeting. There may be an issue
with your mechanism which allocates the Primary meeting attendee for the Replica
meeting proxied promotion. This also may indicate that this API was called in a
non-Replica meeting.MeetingSessionStatusCode.AudioCallAtCapacity
: Credentials provided were correct
but there was no room in the Primary meeting. Promotions to Primary meeting attendee take up a slot, just like
regular Primary meeting attendee connections and are limited by the same mechanisms.MeetingSessionStatusCode.SignalingBadRequest
or MeetingSessionStatusCode.SignalingInternalServerError
:
Other failure, possibly due to disconnect or timeout. These failures are likely retryable.Application code may also receive a callback on AudioVideoObserver.videoAvailabilityDidChange
to indicate they
can begin to share video.
chime::DeleteAttendee
on the Primary meeting attendee will result in AudioVideoObserver.audioVideoWasDemotedFromPrimaryMeeting
to indicate the attendee is no longer able to share.
Any disconnection will trigger an automatic demotion to avoid unexpected or unwanted promotion state on reconnection.
If the attendee still needs to be an interactive participant in the Primary meeting, promoteToPrimaryMeeting
should be called again with the same credentials.
This function should not be called until the first one resolves.
Promise which resolves to a session status for the request. See possible options above.
Remove an observer
Removes an observer to stop receiving callbacks about device changes.
Sets the audio profile to use for audio. The new audio profile takes effect
on the next call to start
or if already started, upon the next reconnect.
Sets the audio profile to use for content sharing. The new audio profile takes effect
on the next call to startContentShare
or startContentShareFromScreenCapture
or if
already started, upon the next reconnect.
Set codec preferences for this content send stream. See AudioVideoControllerFacade.setVideoCodecSendPreferences
for more information.
Sets the device label trigger to use in the case where media device labels are not present due to privacy restrictions in the browser. See above for an explanation of how this works.
Set codec preferences for this clients send stream in order of most preferred to least preferred. The controller will fallback for one of two reasons
If there is no overlap between what is passed in and what is supported by the browser, this function may not have any effect, and the default set of codecs for this browser will be used.
Sets the max bandwidth for video publishing
Start the meeting session. By default this will connect and begin sending and receiving audio, depending on the implementation.
This method also allows you to provide options for how connection occurs.
The only supported option is signalingOnly
. Specifying this option will
cause the controller to only connect the meeting signaling channel. This
can be performed relatively early in the join lifecycle (e.g., prior to
choosing audio devices), which can improve join latency.
Your code is responsible for calling start
again without signalingOnly
to complete connection.
Selects an audio input device to use. The constraint may be a device id,
MediaTrackConstraint
, MediaStream
(containing audio track), or null
to
generate a dummy audio stream. It may also be an AudioTransformDevice to customize the
constraints used or to apply Web Audio transforms.
The promise will resolve indicating success or it will throw an appropriate error indicating the failure.
Start content sharing
Start screen sharing
Selects a video input device to use. The constraint may be a device id,
MediaTrackConstraint
, MediaStream
(containing video track). It may also be an VideoTransformDevice
to apply video transform.
The promise will resolve indicating success or it will throw an appropriate error indicating the failure.
Starts a video preview of the currently selected video and binds it a video element to be displayed before a meeting begins. Make sure to call stopVideoPreviewForVideoInput when the preview is no longer necessary so that the stream can be released and turn off the camera if it is not being used anymore.
Stop the current audio input. This needs to be called to clear out to stop the current audio input resources such as audio stream from microphone.
Stop content sharing
Stop the current video input. This needs to be called to clear out to stop the current video input resources such as video stream from camera.
Stops the stream for a previously bound video preview and unbinds it from the video element.
Unpause content sharing
Generated using TypeDoc
Add an observer