setRemoteVideoSubscriptionOptions abstract method

Future<void> setRemoteVideoSubscriptionOptions({
  1. required int uid,
  2. required VideoSubscriptionOptions options,
})

Options for subscribing to remote video streams.

When a remote user has enabled dual-stream mode, you can call this method to choose the option for subscribing to the video streams sent by the remote user. The default subscription behavior of the SDK for remote video streams depends on the type of registered video observer: If the VideoFrameObserver observer is registered, the default is to subscribe to both raw data and encoded data. If the VideoEncodedFrameObserver observer is registered, the default is to subscribe only to the encoded data. If both types of observers are registered, the default behavior follows the last registered video observer. For example, if the last registered observer is the VideoFrameObserver observer, the default is to subscribe to both raw data and encoded data. If you want to modify the default behavior, or set different subscription options for different uids, you can call this method to set it.

  • uid The user ID of the remote user.
  • options The video subscription options. See VideoSubscriptionOptions.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> setRemoteVideoSubscriptionOptions(
    {required int uid, required VideoSubscriptionOptions options});