Rate this page:

IVideoStream

Interface that may be used to handle add/remove video events on local and remote sides.

Methods

addVideoRenderer

Copy URL

void

addVideoRenderer(

VideoSink

videoRenderer,

RenderScaleType

scaleType
)

Add new video renderer to video stream.

It is recommended to use SurfaceViewRenderer for the most of cases.

Render view can be associated with only one video stream in the call. If it's assigned to multiple streams, it will be associated with the last one.

In case of custom implementation of VideoRenderer.Callback class:

  • VideoRenderer.renderFrameDone(i420Frame) must be called after every VideoRenderer.renderFrame()
  • See ClientConfig parameters to set up video frame format

Parameters

  • videoRenderer:

    VideoSink

    org.webrtc.SurfaceViewRenderer or custom implementation of org.webrtc.VideoRenderer.Callbacks

  • scaleType:

    RenderScaleType

    scaling type for new video renderer

Returns

  • type:

    void

addVideoRenderer

Copy URL

void

addVideoRenderer(

VideoSink

videoRenderer,

RenderScaleType

scaleType,

RendererCommon.RendererEvents

rendererEventsListener
)

Add new video renderer to video stream.

Parameters

  • videoRenderer:

    VideoSink

    org.webrtc.SurfaceViewRenderer or custom implementation of org.webrtc.VideoRenderer.Callbacks

  • scaleType:

    RenderScaleType

    scaling type for new video renderer

  • rendererEventsListener:

    RendererCommon.RendererEvents

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

Returns

  • type:

    void

getVideoStreamId

Copy URL

String

getVideoStreamId()

Get the video stream id.

Returns

  • type:

    String

getVideoStreamType

Copy URL

VideoStreamType

getVideoStreamType()

Get the video stream type

Returns

removeVideoRenderer

Copy URL

void

removeVideoRenderer(

VideoSink

videoRenderer
)

Remove previously added video renderer

Parameters

  • videoRenderer:

    VideoSink

    org.webrtc.SurfaceViewRenderer or custom implementation of org.webrtc.VideoRenderer.Callbacks

Returns

  • type:

    void