SIGN UP

IVideoStream

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

Methods

void addVideoRenderer(VideoRenderer.Callbacks 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:

    VideoRenderer.Callbacks

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

  • scaleType:

    RenderScaleType

    scaling type for new video renderer

void addVideoRenderer(VideoRenderer.Callbacks videoRenderer, RenderScaleType scaleType, RendererCommon.RendererEvents rendererEventsListener)

Add new video renderer to video stream.

Parameters

  • videoRenderer:

    VideoRenderer.Callbacks

    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.

String getVideoStreamId()

Get the video stream id.

Returns

  • Return:

    String

    The video stream id

VideoStreamType getVideoStreamType()

Get the video stream type

Returns

void removeVideoRenderer(VideoRenderer.Callbacks videoRenderer)

Remove previously added video renderer

Parameters

  • videoRenderer:

    VideoRenderer.Callbacks

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