Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebRtcAudioStream

Hierarchy

  • WebRtcMediaStream<WebRtcAudioTrack>
    • WebRtcAudioStream

Implements

  • IStream
  • IInternalStream
  • IMediaStream
  • IStream
  • IInternalMediaStream
  • IAudioStream
  • IInternalAudioStream

Index

Constructors

constructor

  • new WebRtcAudioStream(external: IExternalAudioStream, localTrack: WebRtcAudioTrack, remoteTrack: WebRtcAudioTrack): WebRtcAudioStream
  • Parameters

    • external: IExternalAudioStream
    • localTrack: WebRtcAudioTrack
    • remoteTrack: WebRtcAudioTrack

    Returns WebRtcAudioStream

Properties

Private _dtmfSender

_dtmfSender: RTCDtmfSender = null
internal

Private _external

_external: IExternalAudioStream
internal

Private _onSendDtmfToneChangeValues

_onSendDtmfToneChangeValues: IAction1<Tone>[] = []
internal

Private _onSendDtmfToneValues

_onSendDtmfToneValues: IAction1<Tone>[] = []
internal

Methods

_getExternal

  • _getExternal(): IExternalAudioStream
  • internal

    Returns IExternalAudioStream

addOnDirectionChange

  • addOnDirectionChange(value: IAction0): void
  • Adds a handler that is raised when the stream direction change has occurred.

    Parameters

    • value: IAction0

    Returns void

addOnReceiveDtmfTone

  • addOnReceiveDtmfTone(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

addOnReceiveDtmfToneChange

  • addOnReceiveDtmfToneChange(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

addOnSendDtmfTone

  • addOnSendDtmfTone(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

addOnSendDtmfToneChange

  • addOnSendDtmfToneChange(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

changeDirection

  • changeDirection(newDirection: StreamDirection): Error
  • Records the pending direction of this stream. The LocalDirection of this stream will be updated when the connection renegotiation commences.

    Parameters

    • newDirection: StreamDirection

    Returns Error

getConnection

  • getConnection(): WebRtcConnection
  • Returns WebRtcConnection

getDirection

  • getDirection(): StreamDirection
  • Gets the direction.

    Returns StreamDirection

getDirectionCapabilities

  • getDirectionCapabilities(): StreamDirection
  • Returns StreamDirection

getDynamicProperties

  • getDynamicProperties(): Hash<string, Object>
  • Gets the dynamic properties on this instance.

    Returns Hash<string, Object>

getDynamicValue

  • getDynamicValue(key: string): Object
  • Gets a property value from the local cache.

    Parameters

    • 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.

getId

  • getId(): string
  • Gets the identifier.

    Returns string

getIsDirty

  • getIsDirty(): boolean
  • Gets a value indicating whether this instance is dirty.
    internal

    Returns boolean

getIsSerialized

  • getIsSerialized(): boolean

getLabel

  • getLabel(): string
  • Gets a label that identifies this class.

    Returns string

getLocalBandwidth

  • getLocalBandwidth(): number
  • Gets the local bandwidth in Kbps (Kilobits per second).

    Returns number

getLocalDirection

  • getLocalDirection(): StreamDirection
  • Gets current direction indicated by the local description.

    Returns StreamDirection

getLocalReceive

  • getLocalReceive(): boolean
  • Gets a value indicating whether receiving media is supported by the local peer on this stream.

    Returns boolean

getLocalSend

  • getLocalSend(): boolean
  • Gets a value indicating whether sending media is supported by the local peer on this stream.

    Returns boolean

getLocalTrack

  • getLocalTrack(): WebRtcAudioTrack
  • Returns WebRtcAudioTrack

getMaxInputBitrate

  • getMaxInputBitrate(): number
  • Gets the maximum bitrate that is supported by this stream in Kbps (Kilobits per second). Returns -1 if it is not set.

    Returns number

getMuted

  • getMuted(): boolean
  • Returns boolean

getRemoteBandwidth

  • getRemoteBandwidth(): number
  • Gets the remote bandwidth in Kbps (Kilobits per second).

    Returns number

getRemoteDirection

  • getRemoteDirection(): StreamDirection
  • Gets current direction indicated by the remote description.

    Returns StreamDirection

getRemoteReceive

  • getRemoteReceive(): boolean
  • Gets a value indicating whether receiving media is supported by the local peer on this stream. Returns false if the remote stream direction has not been received.

    Returns boolean

getRemoteSend

  • getRemoteSend(): boolean
  • Gets a value indicating whether sending media is supported by the remote peer on this stream. Returns false if the remote stream direction has not been received.

    Returns boolean

getRemoteTrack

  • getRemoteTrack(): WebRtcAudioTrack
  • Returns WebRtcAudioTrack

Protected getRenegotiationPending

  • getRenegotiationPending(): boolean
  • Gets whether there exist changes that are pending SDP renegotiation.

    Returns boolean

getSerialized

  • getSerialized(): string

getTag

  • getTag(): string
  • Gets an optional tag to identify this instance.

    Returns string

getType

  • getType(): StreamType
  • Gets the type.

    Returns StreamType

getTypeString

  • getTypeString(): string
  • Returns string

insertDtmfTone

  • insertDtmfTone(dtmfTone: Tone): boolean
  • Parameters

    • dtmfTone: Tone

    Returns boolean

insertDtmfTones

  • insertDtmfTones(dtmfTones: Tone[]): boolean
  • Parameters

    • dtmfTones: Tone[]

    Returns boolean

processCachedChanges

  • processCachedChanges(): void
  • Returns void

processSdpMediaDescription

  • processSdpMediaDescription(sdpMessage: Message, sdpMediaDescription: MediaDescription, isLocalDescription: boolean, isOffer: boolean, isRenegotiation: boolean): Error
  • Parameters

    • sdpMessage: Message
    • sdpMediaDescription: MediaDescription
    • isLocalDescription: boolean
    • isOffer: boolean
    • isRenegotiation: boolean

    Returns Error

removeOnDirectionChange

  • removeOnDirectionChange(value: IAction0): void
  • Removes a handler that is raised when the stream direction change has occurred.

    Parameters

    • value: IAction0

    Returns void

removeOnReceiveDtmfTone

  • removeOnReceiveDtmfTone(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

removeOnReceiveDtmfToneChange

  • removeOnReceiveDtmfToneChange(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

removeOnSendDtmfTone

  • removeOnSendDtmfTone(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

removeOnSendDtmfToneChange

  • removeOnSendDtmfToneChange(value: IAction1<Tone>): void
  • Parameters

    • value: IAction1<Tone>

    Returns void

resetRemoteDirection

  • resetRemoteDirection(): void
  • Returns void

setConnection

  • setConnection(remoteTrack: WebRtcConnection): void
  • Parameters

    • remoteTrack: WebRtcConnection

    Returns void

setDynamicProperties

  • setDynamicProperties(value: Hash<string, Object>): void
  • internal

    Parameters

    • value: Hash<string, Object>

    Returns void

setDynamicValue

  • setDynamicValue(key: string, value: Object): void
  • Sets a property value in the local cache.

    Parameters

    • 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

setId

  • setId(value: string): void
  • Sets the identifier.

    Parameters

    • value: string

    Returns void

setIsDirty

  • setIsDirty(value: boolean): void
  • Sets a value indicating whether this instance is dirty.
    internal

    Parameters

    • value: boolean

    Returns void

setIsSerialized

  • setIsSerialized(value: boolean): void
  • internal

    Parameters

    • value: boolean

    Returns void

setLocalBandwidth

  • setLocalBandwidth(value: number): void
  • Sets the local bandwidth in Kbps (Kilobits per second).

    Parameters

    • value: number

    Returns void

setLocalDirection

  • setLocalDirection(value: StreamDirection): void
  • Sets current direction indicated by the local description.

    Parameters

    • value: StreamDirection

    Returns void

setLocalReceive

  • setLocalReceive(value: boolean): void
  • Sets a value indicating whether receiving media is supported by the local peer on this stream.

    Parameters

    • value: boolean

    Returns void

setLocalSend

  • setLocalSend(value: boolean): void
  • Sets a value indicating whether sending media is supported by the local peer on this stream.

    Parameters

    • value: boolean

    Returns void

setMuted

  • setMuted(muted: boolean): void
  • Parameters

    • muted: boolean

    Returns void

Protected setRemoteBandwidth

  • setRemoteBandwidth(value: number): void
  • Sets the remote bandwidth in Kbps (Kilobits per second).

    Parameters

    • value: number

    Returns void

Protected setRemoteDirection

  • setRemoteDirection(value: StreamDirection): void
  • Sets current direction indicated by the remote description.

    Parameters

    • value: StreamDirection

    Returns void

setRemoteTrack

  • setRemoteTrack(remoteTrack: WebRtcAudioTrack): void
  • Parameters

    • remoteTrack: WebRtcAudioTrack

    Returns void

Protected setRenegotiationPending

  • setRenegotiationPending(value: boolean): void
  • Sets whether there exist changes that are pending SDP renegotiation.

    Parameters

    • value: boolean

    Returns void

setSerialized

  • setSerialized(value: string): void
  • internal

    Parameters

    • value: string

    Returns void

setTag

  • setTag(value: string): void
  • Sets an optional tag to identify this instance.

    Parameters

    • value: string

    Returns void

toString

  • toString(): string
  • Returns a string that represents this instance.

    Returns string

unsetDynamicValue

  • unsetDynamicValue(key: string): boolean
  • Unsets a property value in the local cache.

    Parameters

    • 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.