onFirstLocalVideoFrameCaptured method
@detail callback @author zhangzhenyu.samuel @brief RTC SDK receives this callback when the first video frame or screen video frame capture is completed locally. @param videoSource Reserved parameter. @param frameInfo Video information. See VideoFrameInfo{@link #VideoFrameInfo} @note For captured local video frames, you can call setLocalVideoCanvas{@link #RTCEngine#setLocalVideoCanvas} or setLocalVideoSink{@link #RTCEngine#setLocalVideoSink} to render locally.
Implementation
FutureOr<void> onFirstLocalVideoFrameCaptured(
dynamic videoSource, dynamic frameInfo) async {
if ($instance == null || $instance is! IRTCEngineEventHandler) {
return;
}
return ($instance as IRTCEngineEventHandler)
.onFirstLocalVideoFrameCaptured
?.call(
videoSource,
packObject(
frameInfo,
() => VideoFrameInfo.fromMap(VideoFrameInfo.deepPackedMapValues(
VideoFrameInfo.mapMemberToConstructorParams(frameInfo)))));
}