RTCRtpScriptTransformer

The RTCRtpScriptTransformer interface of the WebRTC API provides a worker-side Stream API interface that a WebRTC Encoded Transform can use to modify encoded media frames in the incoming and outgoing WebRTC pipelines.

MDN Reference

Properties

Link copied to clipboard

The options read-only property of the RTCRtpScriptTransformer interface returns the object that was (optionally) passed as the second argument during construction of the corresponding RTCRtpScriptTransform.

Link copied to clipboard

The readable read-only property of the RTCRtpScriptTransformer interface returns a ReadableStream instance is a source for encoded media frames.

Link copied to clipboard

The writable read-only property of the RTCRtpScriptTransformer interface returns a WritableStream instance that can be used as a sink for encoded media frames enqueued on the corresponding RTCRtpScriptTransformer.readable.

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun generateKeyFrame(rid: String = definedExternally): Int

The generateKeyFrame() method of the RTCRtpScriptTransformer interface causes a video encoder to generate a key frame.

Link copied to clipboard
fun generateKeyFrameAsync(rid: String = definedExternally): Promise<JsInt>
Link copied to clipboard
suspend fun sendKeyFrameRequest()

The sendKeyFrameRequest() method of the RTCRtpScriptTransformer interface may be called by a WebRTC Encoded Transform that is processing incoming encoded video frames, in order to request a key frame from the sender.

Link copied to clipboard