Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TransceiverController

TransceiverController provides an interface for managing transceivers associated with peer connection.

Hierarchy

  • TransceiverController

Implemented by

Index

Methods

Optional addRedundantAudioRecoveryMetricsObserver

Optional getMidForGroupId

  • getMidForGroupId(groupId: number): string

Optional getMidForStreamId

  • getMidForStreamId(streamId: number): string
  • Get the associated MID for a given stream ID, either set via updateVideoTransceivers or overriden through setStreamIdForMid.

    Note: According to https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/mid mid may not exist yet even if the transceiver has been created: "This association is established, when possible, whenever either a local or remote description is applied. This field is null if neither a local or remote description has been applied, or if its associated m-line is rejected by either a remote offer or any answer."

    Parameters

    • streamId: number

    Returns string

hasVideoInput

  • hasVideoInput(): boolean

localAudioTransceiver

  • localAudioTransceiver(): RTCRtpTransceiver

localVideoTransceiver

  • localVideoTransceiver(): RTCRtpTransceiver

Optional removeRedundantAudioRecoveryMetricsObserver

replaceAudioTrack

  • replaceAudioTrack(track: MediaStreamTrack): Promise<boolean>

reset

  • reset(): void

setAudioInput

  • setAudioInput(track: MediaStreamTrack): Promise<void>

Optional setAudioPayloadTypes

  • setAudioPayloadTypes(payloadType: Map<string, number>): void
  • Set the audio payload types. This method can be used to make the transceiver controller aware of the codec types from the SDP offer. The keys are the codec names, eg red, opus. The values are the types or numbers used to represent these codecs, eg 63 for red, 111 for opus in chrome. Currently, the SetLocalDescription task uses this method to notify the DefaultTransceiverController of opus and red codec types that are passed on to the audio red worker.

    Parameters

    • payloadType: Map<string, number>

    Returns void

setEncodingParameters

  • setEncodingParameters(params: Map<string, RTCRtpEncodingParameters>): void
  • Set [[RTCRtpEncodingParameters]] on the sender of transceiver. This method should be called whenever the sender's encoding parameters of the local video transceiver need to be updated. For example, the default NScaleVideoUplinkBandwidthPolicy calls this method whenever a video is on/off or the active speaker changes. This method assumes that the sender of the local video transceiver is available and the input parameters should not be empty. The encoding parameters for sender should be retrieved using sender.getParameters and updated using sender.setParameters method.

    Parameters

    • params: Map<string, RTCRtpEncodingParameters>

      The encoding parameters. If you have multiple encoding parameters for different video layers, the key should be the rid corresponding to the RTCRtpEncodingParameters.

    Returns void

setPeer

  • setPeer(peer: RTCPeerConnection): void

Optional setStreamIdForMid

  • setStreamIdForMid(mid: string, streamId: number): void

setVideoInput

  • setVideoInput(track: MediaStreamTrack): Promise<void>

setVideoSendingBitrateKbps

  • setVideoSendingBitrateKbps(bitrateKbps: number): void

setupLocalTransceivers

  • setupLocalTransceivers(): void

trackIsVideoInput

  • trackIsVideoInput(track: MediaStreamTrack): boolean

updateVideoTransceivers

useTransceivers

  • useTransceivers(): boolean

Generated using TypeDoc