/ fm / liveswitch / AudioStream
Class: AudioStream
fm.liveswitch.AudioStream
Hierarchy
-
↳ AudioStream
Implements
Table of contents
Constructors
Methods
- addOnDirectionChange
- addOnDiscardBitrateNotification
- addOnDiscardBitrateRequest
- addOnDiscardOutboundDtmfTones
- addOnLocalEncodingDisabled
- addOnLocalEncodingEnabled
- addOnReceiveDtmfTone
- addOnReceiveDtmfToneChange
- addOnSendDtmfTone
- addOnSendDtmfToneChange
- addOnStateChange
- changeDirection
- getCachedLocalDirection
- getCodecDisabled
- getControlTransportInfo
- getDirection
- getDynamicProperties
- getDynamicValue
- getEncryptionPolicy
- getExternalId
- getG722Disabled
- getId
- getInfo
- getInputMuted
- getLabel
- getLocalBandwidth
- getLocalCanonicalName
- getLocalDirection
- getLocalMedia
- getLocalMuted
- getLocalReceive
- getLocalSend
- getLocalTrack
- getMaxReceiveBitrate
- getMaxSendBitrate
- getMediaDescriptionId
- getMuted
- getOpusDisabled
- getOutputMuted
- getPcmaDisabled
- getPcmuDisabled
- getPreferredCodecs
- getRemoteBandwidth
- getRemoteCanonicalName
- getRemoteDirection
- getRemoteEncoding
- getRemoteMedia
- getRemoteMuted
- getRemoteReceive
- getRemoteRequestedDeactivation
- getRemoteSend
- getRemoteTrack
- getSimulcastMode
- getState
- getTag
- getTransportInfo
- getType
- getTypeString
- insertDtmfTone
- insertDtmfTones
- raiseBitrateNotification
- raiseBitrateRequest
- removeOnDirectionChange
- removeOnDiscardBitrateNotification
- removeOnDiscardBitrateRequest
- removeOnDiscardOutboundDtmfTones
- removeOnLocalEncodingDisabled
- removeOnLocalEncodingEnabled
- removeOnReceiveDtmfTone
- removeOnReceiveDtmfToneChange
- removeOnSendDtmfTone
- removeOnSendDtmfToneChange
- removeOnStateChange
- setCodecDisabled
- setDynamicValue
- setExternalId
- setG722Disabled
- setInputMuted
- setLocalBandwidth
- setLocalDirection
- setLocalMuted
- setLocalReceive
- setLocalSend
- setMaxReceiveBitrate
- setMaxSendBitrate
- setMuted
- setOpusDisabled
- setOutputMuted
- setPcmaDisabled
- setPcmuDisabled
- setPreferredCodecs
- setRemoteDirection
- setRemoteEncoding
- setRemoteMuted
- setSimulcastMode
- setTag
- unsetDynamicValue
- getStaticJitterBufferSize
- setStaticJitterBufferSize
Constructors
constructor
+ new AudioStream(localTrack
: AudioTrack): AudioStream
Parameters:
Name | Type |
---|---|
localTrack |
AudioTrack |
Returns: AudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:42
+ new AudioStream(localTrack
: AudioTrack, remoteTrack
: AudioTrack): AudioStream
Parameters:
Name | Type |
---|---|
localTrack |
AudioTrack |
remoteTrack |
AudioTrack |
Returns: AudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:44
+ new AudioStream(localMedia
: LocalMedia): AudioStream
Parameters:
Name | Type |
---|---|
localMedia |
LocalMedia |
Returns: AudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:45
+ new AudioStream(localMedia
: LocalMedia, remoteMedia
: RemoteMedia): AudioStream
Parameters:
Name | Type |
---|---|
localMedia |
LocalMedia |
remoteMedia |
RemoteMedia |
Returns: AudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:46
+ new AudioStream(remoteMedia
: RemoteMedia): AudioStream
Parameters:
Name | Type |
---|---|
remoteMedia |
RemoteMedia |
Returns: AudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:47
Methods
addOnDirectionChange
▸ addOnDirectionChange(value
: IAction0): void
Registers a handler to be called when the stream direction changes.
Stream direction indicates the direction of media flow. For example:
- A stream in an SFU upstream connection has a direction of
SendOnly
. - A stream in an SFU downstream connection has a direction of
ReceiveOnly
. - A stream in an MCU connection has a direction of
SendReceive
if it is attached to both local and remote media. If it is only attached to local media, it has a direction ofSendOnly
. If it is only attached to remote media, it has a direction ofReceiveOnly
.
The direction of a stream can change over its lifecycle. For example: - An update to an SFU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the direction of the stream will change to
Inactive
. - An update to an SFU downstream connection might cause it to stop receiving audio or video frames. In this case, the direction of the stream will change to
Inactive
. - An update to an MCU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the following occurs:
- If the direction of the stream was
SendOnly
, then the direction changes toInactive
. - If the direction of the stream was
ReceiveOnly
, then the direction changes toSendReceive
.
- If the direction of the stream was
- An update to an MCU upstream connection might instruct it to stop receiving audio or video frames. In this case, the following occurs:
- If the direction of the stream was
ReceiveOnly
, then the direction changes toInactive
. - If the direction of the stream was
SendReceive
, then the direction changes toSendOnly
.
An event handler bound to the change in direction can be used to update the UI accordingly so the user is aware of the change in the state of the application.
- If the direction of the stream was
Parameters:
Name | Type |
---|---|
value |
IAction0 |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:159
addOnDiscardBitrateNotification
▸ addOnDiscardBitrateNotification(value
: IAction1<BitrateNotification>): void
Registers a handler to be called when a bitrate notification message is discarded by the internal in-band messaging mechanism because the peer does not support bitrate notifications.
In this case, the bitrate notification needs to be transported out of band. LiveSwitch handles this internally by sending the message over Data Streams. No further action is required by application developers.
Use this event for for diagnostics and debugging.
Parameters:
Name | Type | Description |
---|---|---|
value |
IAction1<BitrateNotification> | The method that is called once a stream bitrate is discarded. The method should return void, and it should take single parameters of the BitrateNotification type (representing a bitrate notification). |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:187
addOnDiscardBitrateRequest
▸ addOnDiscardBitrateRequest(value
: IAction1<BitrateRequest>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<BitrateRequest> |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:171
addOnDiscardOutboundDtmfTones
▸ addOnDiscardOutboundDtmfTones(value
: IAction1<Tone[]>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone[]> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:154
addOnLocalEncodingDisabled
▸ addOnLocalEncodingDisabled(value
: IAction1<EncodingInfo>): void
Registers a handler to be called after local encoding is disabled.
Parameters:
Name | Type | Description |
---|---|---|
value |
IAction1<EncodingInfo> | The method that will be called. The method should return void and it should take single parameters of the type EncodingInfo . |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:152
addOnLocalEncodingEnabled
▸ addOnLocalEncodingEnabled(value
: IAction1<EncodingInfo>): void
Registers a handler to be called after local encoding is enabled.
Parameters:
Name | Type | Description |
---|---|---|
value |
IAction1<EncodingInfo> | The method that will be called. The method should return void and should take single parameters of the type EncodingInfo . |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:160
addOnReceiveDtmfTone
▸ addOnReceiveDtmfTone(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:98
addOnReceiveDtmfToneChange
▸ addOnReceiveDtmfToneChange(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:101
addOnSendDtmfTone
▸ addOnSendDtmfTone(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:104
addOnSendDtmfToneChange
▸ addOnSendDtmfToneChange(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:107
addOnStateChange
▸ addOnStateChange(value
: IAction0): void
Registers a handler to be called once the connection state changes.
This method can track the state of the connection and can be used to display the current status of the connection to the user, add or remove media views in the UI, and handle retry logic if the connection fails.
The connection object passes to the handler which allows access to the current connection state through the connection.getState()
method. This returns a ConnectionState
enum.
Possible connection states are the following:
New
: The connection object has been created, but open has not yet been called.Initializing
: The connection is initializing, but no connection attempts have been made.Connecting
: The connection is being established.Connected
: The connection has been successfully established.Failing
: The connection has encountered an error and is cleaning up.Failed
: The connection encountered an error and has cleaned up.Closing
: The connection has been instructed to close and is cleaning up.Closed
: The connection has been instructed to close and has cleaned up.
Parameters:
Name | Type |
---|---|
value |
IAction0 |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:29
changeDirection
▸ changeDirection(newDirection
: StreamDirection): Error
Parameters:
Name | Type |
---|---|
newDirection |
StreamDirection |
Returns: Error
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:37
getCachedLocalDirection
▸ getCachedLocalDirection(): StreamDirection
Returns: StreamDirection
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:47
getCodecDisabled
▸ getCodecDisabled(name
: string): boolean
Parameters:
Name | Type |
---|---|
name |
string |
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:100
getControlTransportInfo
▸ getControlTransportInfo(): TransportInfo
Returns: TransportInfo
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:132
getDirection
▸ getDirection(): StreamDirection
Gets the Media Direction of a stream as a StreamDirection
enumerator. The following stream direction values are defined:
SendReceive
: A stream that can send and can receive.SendOnly
: A stream that can send.ReceiveOnly
: A stream that can receive.Inactive
: A stream that cannot send or receive.Unset
: A stream direction has not been set.
Returns: StreamDirection
The Media Direction as a StreamDirection
enumerator.
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:54
getDynamicProperties
▸ getDynamicProperties(): Hash<string, Object>
Gets all dynamic properties on this instance.
Returns: Hash<string, Object>
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:37
getDynamicValue
▸ getDynamicValue(key
: string): Object
Gets a property value from the local cache.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns: Object
The stored value, if found; otherwise null.
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:58
getEncryptionPolicy
▸ getEncryptionPolicy(): EncryptionPolicy
Returns: EncryptionPolicy
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:41
getExternalId
▸ getExternalId(): string
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:98
getG722Disabled
▸ getG722Disabled(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:132
getId
▸ getId(): string
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:94
getInfo
▸ getInfo(): MediaStreamInfo
Returns: MediaStreamInfo
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:121
getInputMuted
▸ getInputMuted(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:62
getLabel
▸ getLabel(): string
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:102
getLocalBandwidth
▸ getLocalBandwidth(): number
Returns: number
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:26
getLocalCanonicalName
▸ getLocalCanonicalName(): string
Gets the local canonical end-point identifier (CNAME) used by RTCP.
The CNAME is a unique identifier for endpoints across an application instance and can be used for third-party monitoring.
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:140
getLocalDirection
▸ getLocalDirection(): StreamDirection
Returns: StreamDirection
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:106
getLocalMedia
▸ getLocalMedia(): LocalMedia
Returns: LocalMedia
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:20
getLocalMuted
▸ getLocalMuted(): boolean
Checks whether the local stream is muted. Returns true if the local stream is muted and false otherwise.
A muted stream does not show or play media, but the stream is not disabled and its data continues to flow through the processing pipeline.
Returns: boolean
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:34
getLocalReceive
▸ getLocalReceive(): boolean
Checks whether the local peer supports receiving media on this stream. Returns true if the local peer supports receiving media on this stream and false otherwise.
Use this method to determine if a stream is used for receiving media.
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:62
getLocalSend
▸ getLocalSend(): boolean
Checks whether the local peer on this stream supports sending media on this stream. Returns true if the local peer supports sending media and false otherwise.
Use this method to determine if a stream is used for sending media or only receiving media.
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:74
getLocalTrack
▸ getLocalTrack(): AudioTrack
Gets the track from this media. Returns null if there are no tracks.
Returns: AudioTrack
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:17
getMaxReceiveBitrate
▸ getMaxReceiveBitrate(): number
Gets the maximum bitrate that the connection receives in Kbps.
The value of the maximum bitrate the stream receives must be less than or equal to the local bandwidth.
Returns: number
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:212
getMaxSendBitrate
▸ getMaxSendBitrate(): number
Gets the maximum bitrate that the upstream connection sends in Kbps.
The value of the maximum bitrate the stream sends must be less than or equal to the remote bandwidth.
Returns: number
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:201
getMediaDescriptionId
▸ getMediaDescriptionId(): string
Gets the media description ID of this stream.
The media description ID is only available once a connection is opened with this stream, because it is obtained from the local SDP description of this stream.
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:114
getMuted
▸ getMuted(): boolean
Checks whether the stream is muted. Returns true if the stream is muted and false otherwise.
A muted stream does not show or play media, but the stream is not disabled and its data continues to flow through the processing pipeline.
Returns: boolean
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:59
getOpusDisabled
▸ getOpusDisabled(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:129
getOutputMuted
▸ getOutputMuted(): boolean
Checks whether the output track is muted. Returns true if the output track is muted and false otherwise.
A muted stream does not show or play media, but the source is not disabled and its data continues to flow through the processing pipeline.
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:70
getPcmaDisabled
▸ getPcmaDisabled(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:138
getPcmuDisabled
▸ getPcmuDisabled(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:135
getPreferredCodecs
▸ getPreferredCodecs(): string[]
Returns: string[]
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:94
getRemoteBandwidth
▸ getRemoteBandwidth(): number
Gets the remote bandwidth in Kbps. This value is signalled in the remote session description received from the remote endpoint.
Use setMaxSendBitrate()
to control the outbound media bitrate once the session has been negotiated.
Returns: number
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:78
getRemoteCanonicalName
▸ getRemoteCanonicalName(): string
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:144
getRemoteDirection
▸ getRemoteDirection(): StreamDirection
Returns: StreamDirection
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:90
getRemoteEncoding
▸ getRemoteEncoding(): EncodingInfo
Returns: EncodingInfo
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:107
getRemoteMedia
▸ getRemoteMedia(): RemoteMedia
Returns: RemoteMedia
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:26
getRemoteMuted
▸ getRemoteMuted(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:40
getRemoteReceive
▸ getRemoteReceive(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:82
getRemoteRequestedDeactivation
▸ getRemoteRequestedDeactivation(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:51
getRemoteSend
▸ getRemoteSend(): boolean
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:86
getRemoteTrack
▸ getRemoteTrack(): AudioTrack
Returns: AudioTrack
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:22
getSimulcastMode
▸ getSimulcastMode(): SimulcastMode
Returns: SimulcastMode
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:114
getState
▸ getState(): StreamState
Returns: StreamState
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:11
getTag
▸ getTag(): string
Returns: string
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:118
getTransportInfo
▸ getTransportInfo(): TransportInfo
Returns: TransportInfo
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:183
getType
▸ getType(): StreamType
Returns: StreamType
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:122
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:4
insertDtmfTone
▸ insertDtmfTone(dtmfTone
: Tone): boolean
Parameters:
Name | Type |
---|---|
dtmfTone |
Tone |
Returns: boolean
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:110
insertDtmfTones
▸ insertDtmfTones(dtmfTones
: Tone[]): boolean
Parameters:
Name | Type |
---|---|
dtmfTones |
Tone[] |
Returns: boolean
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:113
raiseBitrateNotification
▸ raiseBitrateNotification(bitrateNotification
: BitrateNotification): boolean
Parameters:
Name | Type |
---|---|
bitrateNotification |
BitrateNotification |
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:193
raiseBitrateRequest
▸ raiseBitrateRequest(bitrateRequest
: BitrateRequest): boolean
Parameters:
Name | Type |
---|---|
bitrateRequest |
BitrateRequest |
Returns: boolean
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:177
removeOnDirectionChange
▸ removeOnDirectionChange(value
: IAction0): void
Removes a handler to be called when the stream direction changes.
Stream direction indicates the direction of media flow. For example:
- A stream in an SFU upstream connection has a direction of
SendOnly
. - A stream in an SFU downstream connection has a direction of
ReceiveOnly
. - A stream in an MCU connection has a direction of
SendReceive
if it is attached to both local and remote media. If it is only attached to local media, it has a direction ofSendOnly
. If it is only attached to remote media, it has a direction ofReceiveOnly
.
The direction of a stream can change over its lifecycle. For example: - An update to an SFU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the direction of the stream will change to
Inactive
. - An update to an SFU downstream connection might cause it to stop receiving audio or video frames. In this case, the direction of the stream will change to
Inactive
. - An update to an MCU upstream connection might instruct the stream to stop sending audio or video frames. In this case, the following occurs:
- If the direction of the stream was
SendOnly
, then the direction changes toInactive
. - If the direction of the stream was
ReceiveOnly
, then the direction changes toSendReceive
.
- If the direction of the stream was
- An update to an MCU upstream connection might instruct it to stop receiving audio or video frames. In this case, the following occurs:
- If the direction of the stream was
ReceiveOnly
, then the direction changes toInactive
. - If the direction of the stream was
SendReceive
, then the direction changes toSendOnly
.
- If the direction of the stream was
Parameters:
Name | Type |
---|---|
value |
IAction0 |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:179
removeOnDiscardBitrateNotification
▸ removeOnDiscardBitrateNotification(value
: IAction1<BitrateNotification>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<BitrateNotification> |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:190
removeOnDiscardBitrateRequest
▸ removeOnDiscardBitrateRequest(value
: IAction1<BitrateRequest>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<BitrateRequest> |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:174
removeOnDiscardOutboundDtmfTones
▸ removeOnDiscardOutboundDtmfTones(value
: IAction1<Tone[]>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone[]> |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:159
removeOnLocalEncodingDisabled
▸ removeOnLocalEncodingDisabled(value
: IAction1<EncodingInfo>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<EncodingInfo> |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:164
removeOnLocalEncodingEnabled
▸ removeOnLocalEncodingEnabled(value
: IAction1<EncodingInfo>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<EncodingInfo> |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:167
removeOnReceiveDtmfTone
▸ removeOnReceiveDtmfTone(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:116
removeOnReceiveDtmfToneChange
▸ removeOnReceiveDtmfToneChange(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:119
removeOnSendDtmfTone
▸ removeOnSendDtmfTone(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:122
removeOnSendDtmfToneChange
▸ removeOnSendDtmfToneChange(value
: IAction1<Tone>): void
Parameters:
Name | Type |
---|---|
value |
IAction1<Tone> |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:125
removeOnStateChange
▸ removeOnStateChange(value
: IAction0): void
Parameters:
Name | Type |
---|---|
value |
IAction0 |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:33
setCodecDisabled
▸ setCodecDisabled(name
: string, disabled
: boolean): void
Parameters:
Name | Type |
---|---|
name |
string |
disabled |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:103
setDynamicValue
▸ setDynamicValue(key
: string, value
: Object): void
Sets a property value in the local cache.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
value |
Object | The property value. This can be any object that needs to be stored for future use. |
Returns: void
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:95
setExternalId
▸ setExternalId(value
: string): void
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:126
setG722Disabled
▸ setG722Disabled(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:144
setInputMuted
▸ setInputMuted(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:87
setLocalBandwidth
▸ setLocalBandwidth(value
: number): void
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:81
setLocalDirection
▸ setLocalDirection(value
: StreamDirection): void
Parameters:
Name | Type |
---|---|
value |
StreamDirection |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:130
setLocalMuted
▸ setLocalMuted(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:37
setLocalReceive
▸ setLocalReceive(receiveEnabled
: boolean): void
Parameters:
Name | Type |
---|---|
receiveEnabled |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:66
setLocalSend
▸ setLocalSend(sendEnabled
: boolean): void
Parameters:
Name | Type |
---|---|
sendEnabled |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:78
setMaxReceiveBitrate
▸ setMaxReceiveBitrate(value
: number): void
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:215
setMaxSendBitrate
▸ setMaxSendBitrate(value
: number): void
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:204
setMuted
▸ setMuted(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:84
setOpusDisabled
▸ setOpusDisabled(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:141
setOutputMuted
▸ setOutputMuted(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:90
setPcmaDisabled
▸ setPcmaDisabled(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:150
setPcmuDisabled
▸ setPcmuDisabled(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:147
setPreferredCodecs
▸ setPreferredCodecs(names
: string[]): void
Parameters:
Name | Type |
---|---|
names |
string[] |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:97
setRemoteDirection
▸ setRemoteDirection(value
: StreamDirection): void
Parameters:
Name | Type |
---|---|
value |
StreamDirection |
Returns: void
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:134
setRemoteEncoding
▸ setRemoteEncoding(value
: EncodingInfo): void
Parameters:
Name | Type |
---|---|
value |
EncodingInfo |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:110
setRemoteMuted
▸ setRemoteMuted(value
: boolean): void
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:43
setSimulcastMode
▸ setSimulcastMode(value
: SimulcastMode): void
Parameters:
Name | Type |
---|---|
value |
SimulcastMode |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/MediaStream.ts:117
setTag
▸ setTag(value
: string): void
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Implementation of: IExternalAudioStream
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Stream.ts:138
unsetDynamicValue
▸ unsetDynamicValue(key
: string): boolean
Removes a property value from the local cache. Returns true if the value was removed and returns false otherwise.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns: boolean
true
if the value was removed; otherwise, false
.
Inherited from: MediaStream
Defined in: Generated/TypeScript/fm.liveswitch/Dynamic.ts:122
getStaticJitterBufferSize
▸ Static
getStaticJitterBufferSize(): number
Gets the static Jitter Buffer Size for supported connection types. Currently, only Media-over-Websockets connections are supported.
Returns: number
timeMs - size of the jitter buffer in ms.
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:180
setStaticJitterBufferSize
▸ Static
setStaticJitterBufferSize(timeMs
: number): void
Sets the static Jitter Buffer Size for supported connection types. Currently, only Media-over-Websockets connections are supported. Defaults to 250 ms.
Parameters:
Name | Type | Description |
---|---|---|
timeMs |
number | size of the jitter buffer in ms. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/AudioStream.ts:171