RTCViewContext.localContext constructor

RTCViewContext.localContext({
  1. required String uid,
  2. StreamIndex streamType = StreamIndex.main,
})

Sets the canvas for rendering local video.

The application binds the canvas to the local video stream by calling this API.
In application development, this method is usually called after initialization but before joining the room. The binding remains in effect after leaving the room.
Call RTCVideo.removeLocalVideo to unbind.

Implementation

RTCViewContext.localContext({
  required this.uid,
  this.streamType = StreamIndex.main,
})  : canvasType = VideoCanvasType.local,
      roomId = '';