onRequestKeyFrame$info$withVideoIndex method
FutureOr<void>
onRequestKeyFrame$info$withVideoIndex(
- dynamic streamId,
- dynamic info,
- dynamic videoIndex
override
@detail callback @author wangzhanqiang @brief This callback is used to inform the stream publisher that a keyframe needs to be regenerated. @param streamId Remote encoded stream ID @param info Remote encoded stream information. See ByteRTCStreamInfo{@link #ByteRTCStreamInfo} @param videoIndex The subscript of the corresponding encoded stream
Implementation
FutureOr<void> onRequestKeyFrame$info$withVideoIndex(
dynamic streamId, dynamic info, dynamic videoIndex) async {
if ($instance == null || $instance is! IExternalVideoEncoderEventHandler) {
return;
}
return ($instance as IExternalVideoEncoderEventHandler)
.onRequestKeyFrame
?.call(streamId.toString(), int.tryParse(videoIndex.toString()) ?? 0);
}