setRemoteDisplay method
设置远端显示view
@param remoteVideoView 远端画面显示view, 用于显示远端用户传输过来的视频数据 @discussion 在loginRoom之前调用,loginRoom之后,远端视频数据会显示到 remoteVideoView, 支持videoView 动态更新与主动释放{@link #removeRemoteDisplay(long)}; 除主动释放外所设置的{@link RTCVideoView} 也会在远端退出房间的{@link #onLeaving()} 回调内或登出房间时自动释放 ; remoteVideoView的大小要与采集的视频大小成比例
Implementation
Future<void> setRemoteDisplay(int viewId) {
if (viewId == null) {
return bRTCPluginChannel
.invokeMethod('setRemoteDisplay', {"viewId": viewId});
} else {
if (Platform.isAndroid) {
return BRTCVideoViewController(
BRTCCloudConfig.BRTC_Video_SurfaceView_Channel, viewId)
.setRemoteDisplay();
} else {
return BRTCVideoViewController(
BRTCCloudConfig.BRTC_Video_Remote_View_Channel, viewId)
.setRemoteDisplay();
}
}
}