startRemoteView method

Future<void> startRemoteView(
  1. String userId,
  2. int streamType,
  3. int? viewId
)

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:

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);
  }
}