setRemoteVideoSubscriptionOptions abstract method

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

Sets the subscription options for the remote video stream.

When the remote side sends dual streams, you can call this method to set the subscription options for the remote video stream. The SDK's default subscription behavior for remote video streams depends on the type of registered video observer: If VideoFrameObserver is registered, the SDK subscribes to both raw and encoded data by default. If VideoEncodedFrameObserver is registered, the SDK subscribes to encoded data only by default. If both observers are registered, the SDK follows the most recently registered one. For example, if VideoFrameObserver is registered later, the SDK subscribes to both raw and encoded data by default. If you want to change the above default behavior or set different subscription options for different uid s, you can call this method.

  • uid Remote user ID.
  • options Video stream subscription settings. 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. See Error Codes for details and resolution suggestions.

Implementation

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