IVideoStream
Interface that represents a local or remote video stream.
Methods
addVideoRenderer
void
addVideoRenderer(VideoSink
videoRenderer, scaleType)
Adds a new video renderer to the video stream.
It is recommended to use SurfaceViewRenderer for the most of cases.
The render view can be associated with only one video stream in a call. If it is assigned to multiple streams, it is associated with the last one.
In case of a custom implementation of com.voximplant.webrtc.VideoSink interface:
- Implementations should call frame.retain() if they need to hold a reference to the frame after VideoSink.onFrame(VideoFrame) returns. Each call to retain() should be followed by a call to frame.release() when the reference is no longer needed.
- See ClientConfig parameters to set up video frame format
Parameters
videoRenderer:
VideoSink
com.voximplant.webrtc.SurfaceViewRenderer or a custom implementation of com.voximplant.webrtc.VideoSink
scaleType:
scaling type for a new video renderer
Returns
type:
void
addVideoRenderer
void
addVideoRenderer(VideoSink
videoRenderer, scaleType, RendererCommon.RendererEvents
rendererEventsListener)
Adds a new video renderer to the video stream.
Parameters
videoRenderer:
VideoSink
com.voximplant.webrtc.SurfaceViewRenderer or a custom implementation of com.voximplant.webrtc.VideoSink
scaleType:
scaling type for a new video renderer
rendererEventsListener:
RendererCommon.RendererEvents
Listener to handle the first frame rendered and frame resolution changed events.
Returns
type:
void
getVideoStreamId
String
getVideoStreamId()
Gets the video stream ID.
Returns
type:
String
getVideoStreamType
getVideoStreamType()
Gets the video stream type.
Returns
type:
removeVideoRenderer
void
removeVideoRenderer(VideoSink
videoRenderer)
Removes a previously added video renderer.
Parameters
videoRenderer:
VideoSink
com.voximplant.webrtc.SurfaceViewRenderer or a custom implementation of com.voximplant.webrtc.VideoSink
Returns
type:
void