RTCViewContext.localContext constructor

RTCViewContext.localContext({
  1. required String userId,
  2. StreamIndex streamIndex = StreamIndex.main,
  3. VideoRotation videoRotation = VideoRotation.rotation0,
})

设置渲染本地视频的画布

应用程序通过调用此接口将画布和本地视频流绑定。 在应用程序开发中,通常在初始化后调用该方法进行本地视频设置,然后再加入房间,退出房间后绑定仍然有效。 调用 removeLocalVideo 可解除绑定。

Implementation

RTCViewContext.localContext({
  required this.userId,
  this.streamIndex = StreamIndex.main,
  this.videoRotation = VideoRotation.rotation0,
})  : canvasType = VideoCanvasType.local,
      roomId = '',
      viewId = genViewId('', userId);