startRemoteView method
Display remote video image or substream and bind the video rendering control at the same time.
Parameters:
userId
: userId
of the specified remote user
streamType
: Video stream type of the userId
specified for watching:
-
HD big image: TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG
-
Smooth big image: TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_SMALL
-
Substream (screen sharing): TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_SUB
viewId
: viewId
generated by TRTCCloudVideoView
Platform not supported:
- macOS
Implementation
Future<void> startRemoteView(String userId, int streamType, int? viewId) {
if (viewId == null) {
return _cloudChannel!.invokeMethod(
'startRemoteView', {"userId": userId, "streamType": streamType});
} else {
return TRTCCloudVideoViewController(viewId)
.startRemoteView(userId, streamType, _cloudChannel!.name);
}
}