RTCRtpSender

open class RTCRtpSender(source)

The RTCRtpSender interface provides the ability to control and obtain details about how a particular MediaStreamTrack is encoded and sent to a remote peer.

MDN Reference

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open external val dtmf: RTCDTMFSender?

The read-only dtmf property on the RTCRtpSender interface returns an RTCDTMFSender you can use to send DTMF tones on this sender's audio track.

Link copied to clipboard
open external val track: MediaStreamTrack?

The track read-only property of the RTCRtpSender interface returns the MediaStreamTrack which is being handled by the RTCRtpSender.

Link copied to clipboard
open external var transform: RTCRtpSenderTransform?

The transform property of the RTCRtpSender object is used to insert a transform stream (TransformStream) running in a worker thread into the sender pipeline. This allows stream transforms to be applied to encoded video and audio frames after they are output by a codec, and before they are sent.

Link copied to clipboard
open external val transport: RTCDtlsTransport?

The read-only transport property of an RTCRtpSender object provides the RTCDtlsTransport object used to interact with the underlying transport over which the sender is exchanging Real-time Transport Control Protocol (RTCP) packets.

Functions

Link copied to clipboard
open external fun getParameters(): RTCRtpSendParameters

The getParameters() method of the RTCRtpSender interface returns an object describing the current configuration for how the sender's track will be encoded and transmitted to a remote RTCRtpReceiver.

Link copied to clipboard
inline suspend fun RTCRtpSender.getStats(): RTCStatsReport

The RTCRtpSender method getStats() asynchronously requests an RTCStatsReport object which provides statistics about outgoing traffic on the RTCPeerConnection which owns the sender, returning a Promise which is fulfilled when the results are available.

Link copied to clipboard
open external fun getStatsAsync(): Promise<RTCStatsReport>

The RTCRtpSender method getStats() asynchronously requests an RTCStatsReport object which provides statistics about outgoing traffic on the RTCPeerConnection which owns the sender, returning a Promise which is fulfilled when the results are available.

Link copied to clipboard
inline suspend fun RTCRtpSender.replaceTrack(withTrack: MediaStreamTrack?)

The RTCRtpSender method replaceTrack() replaces the track currently being used as the sender's source with a new MediaStreamTrack.

Link copied to clipboard
open external fun replaceTrackAsync(withTrack: MediaStreamTrack?): Promise<Void>

The RTCRtpSender method replaceTrack() replaces the track currently being used as the sender's source with a new MediaStreamTrack.

Link copied to clipboard
inline suspend fun RTCRtpSender.setParameters(parameters: RTCRtpSendParameters)
inline suspend fun RTCRtpSender.setParameters(parameters: RTCRtpSendParameters, setParameterOptions: RTCSetParameterOptions)

The setParameters() method of the RTCRtpSender interface applies changes the configuration of sender's track, which is the MediaStreamTrack for which the RTCRtpSender is responsible.

Link copied to clipboard
open external fun setParametersAsync(parameters: RTCRtpSendParameters, setParameterOptions: RTCSetParameterOptions = definedExternally): Promise<Void>

The setParameters() method of the RTCRtpSender interface applies changes the configuration of sender's track, which is the MediaStreamTrack for which the RTCRtpSender is responsible.

Link copied to clipboard
open external fun setStreams(vararg streams: MediaStream)

The RTCRtpSender method setStreams() associates the sender's track with the specified MediaStream objects.