Rate this page:

VideoStream

This API is in beta and subject to change.

Base interface for LocalVideoStream and RemoteVideoStream that provides the base functionality such as adding and removing video renderers.

Methods

addVideoRenderer

Copy URL
fun addVideoRenderer(videoRenderer: 

VideoSink

,
scaleType:

RenderScaleType

,
rendererEventsListener:

RendererEvents?

):

Unit

This API is in beta and subject to change.

Adds a new video renderer to the video stream.

Parameters

  • videoRenderer:

    VideoSink

    org.webrtc.SurfaceViewRenderer or org.webrtc.TextureViewRenderer

  • scaleType:

    RenderScaleType

    The scale type to be applied to the video renderer

  • rendererEventsListener:

    RendererEvents?

    Optional

    Listener to handle the first frame rendered and frame resolution changed events

Returns

  • type:

    Unit

removeVideoRenderer

Copy URL
fun removeVideoRenderer(videoRenderer: 

VideoSink

):

Unit

This API is in beta and subject to change.

Removes the previously added video renderer.

Parameters

  • videoRenderer:

    VideoSink

    org.webrtc.SurfaceViewRenderer or org.webrtc.TextureViewRenderer

Returns

  • type:

    Unit

removeAllVideoRenderers

Copy URL
fun removeAllVideoRenderers(): 

Unit

This API is in beta and subject to change.

Removes all video renderers for the video stream

Returns

  • type:

    Unit

Props

id

Copy URL
val id: 

String

This API is in beta and subject to change.

The video stream id.

Returns

  • type:

    String

type

Copy URL
val type: 

VideoStreamType

This API is in beta and subject to change.

The video stream type.

Returns