onRateUpdate$info$withVideoIndex$withFps$withBitRate method
FutureOr<void>
onRateUpdate$info$withVideoIndex$withFps$withBitRate(
- dynamic streamId,
- dynamic info,
- dynamic videoIndex,
- dynamic fps,
- dynamic bitRateKps,
override
@detail callback @author wangzhanqiang @brief When the frame rate or bit rate of a custom encoded stream changes, the callback is triggered @param streamId Remote encoded stream ID @param info Remote encoded stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo} @param videoIndex Corresponding to the subscript of the encoded stream @param fps Changed frame rate, unit: fps @param bitRateKps Changed bit rate, unit: kbps
Implementation
FutureOr<void> onRateUpdate$info$withVideoIndex$withFps$withBitRate(
dynamic streamId,
dynamic info,
dynamic videoIndex,
dynamic fps,
dynamic bitRateKps) async {
if ($instance == null || $instance is! IExternalVideoEncoderEventHandler) {
return;
}
return ($instance as IExternalVideoEncoderEventHandler).onRateUpdate?.call(
streamId.toString(),
int.tryParse(videoIndex.toString()) ?? 0,
int.tryParse(fps.toString()) ?? 0,
int.tryParse(bitRateKps.toString()) ?? 0);
}