onActiveVideoLayer$info$withVideoIndex$withActive method

FutureOr<void> onActiveVideoLayer$info$withVideoIndex$withActive(
  1. NSString streamId,
  2. ByteRTCStreamInfo info,
  3. NSInteger videoIndex,
  4. BOOL active,
)

@valid since 3.56 @detail callback @author wangqianqian.1104 @brief 作为自定义编码视频流的发送端,你会在视频流可发送状态发生变化时,收到此回调。
你可以根据此回调的提示,仅对可发送的视频流进行编码,以降低本端视频编码性能消耗。此回调会根据多个因素综合判断触发,包括:本端设备性能和本端网络性能,以及按需订阅场景下,远端用户是否订阅。 @param streamId 自定义编码流 ID @param info 自定义编码流信息,参看 ByteRTCStreamInfo{@link #ByteRTCStreamInfo} @param videoIndex 对应编码流的下标 @param active 该路流可发送状态 @note 要收到此回调,必须调用 setVideoSourceType:{@link #ByteRTCEngine#setVideoSourceType} 设置视频源是自定义编码,且通过 setExternalVideoEncoderEventHandler:{@link #ByteRTCEngine#setExternalVideoEncoderEventHandler} 设置了回调句柄。

Implementation

FutureOr<void> onActiveVideoLayer$info$withVideoIndex$withActive(
    NSString streamId,
    ByteRTCStreamInfo info,
    NSInteger videoIndex,
    BOOL active) async {}