onFirstLocalVideoFrameCaptured method
@detail callback @author zhangzhenyu.samuel @brief RTC SDK 在本地完成第一帧视频帧或屏幕视频帧采集时,收到此回调。 @param videoSource 预留参数。 @param frameInfo 视频信息,参看 VideoFrameInfo{@link #VideoFrameInfo} @note 对于采集到的本地视频帧,你可以调用 setLocalVideoCanvas{@link #RTCEngine#setLocalVideoCanvas} 或 setLocalVideoSink{@link #RTCEngine#setLocalVideoSink} 在本地渲染。
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)))));
}