setRemoteVideoSubscriptionOptions abstract method

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

设置远端视频流的订阅选项。

当远端发送双流时,可调用此方法来设置远端视频流的订阅选项。SDK 对远端视频流的默认订阅行为取决于注册的视频观测器类型: 如果注册的是 VideoFrameObserver 观测器,则默认订阅原始数据和编码后的数据。 如果注册的是 VideoEncodedFrameObserver 观测器,则默认仅订阅编码后的数据。 如果注册了两种观测器,则默认跟随后注册的视频观测器。举例来说,如果后注册的是 VideoFrameObserver 观测器,则默认订阅原始数据和编码后的数据。 如果你想修改以上默认行为,或者想针对不同 uid 设置不同的订阅选项,可调用该方法设置。

  • uid 远端用户 ID。
  • options 视频流的订阅设置,详见 VideoSubscriptionOptions 。

Returns 方法成功调用时,无返回值;方法调用失败时,会抛出 AgoraRtcException 异常,你需要捕获异常并进行处理。详见错误码了解详情和解决建议。

Implementation

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