From 507dfd05bff2ceec050e8be15fc07c18394dc80d Mon Sep 17 00:00:00 2001 From: Tadas Petra Date: Tue, 2 May 2023 15:06:40 -0500 Subject: [PATCH] fix: updated the callback --- lib/controllers/rtc_event_handlers.dart | 4 ++-- lib/models/agora_rtc_event_handlers.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/controllers/rtc_event_handlers.dart b/lib/controllers/rtc_event_handlers.dart index d8baaa7..391e76b 100644 --- a/lib/controllers/rtc_event_handlers.dart +++ b/lib/controllers/rtc_event_handlers.dart @@ -60,9 +60,9 @@ Future rtcEngineEventHandler( }, onFirstLocalAudioFramePublished: (connection, elapsed) { agoraEventHandlers.onFirstLocalAudioFramePublished ?.call(connection, elapsed); - }, onFirstLocalVideoFrame: (connection, width, height, elapsed) { + }, onFirstLocalVideoFrame: (videoSourceType, width, height, elapsed) { agoraEventHandlers.onFirstLocalVideoFrame - ?.call(connection, width, height, elapsed); + ?.call(videoSourceType, width, height, elapsed); }, onFirstLocalVideoFramePublished: (connection, elapsed) { agoraEventHandlers.onFirstLocalVideoFramePublished ?.call(connection, elapsed); diff --git a/lib/models/agora_rtc_event_handlers.dart b/lib/models/agora_rtc_event_handlers.dart index d92a7a2..91338b7 100644 --- a/lib/models/agora_rtc_event_handlers.dart +++ b/lib/models/agora_rtc_event_handlers.dart @@ -146,7 +146,7 @@ class AgoraRtcEventHandlers { /// * [height] The height (px) of the first local video frame. /// * [elapsed] Time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback. If you call startPreview before calling joinChannel [2/2], then this parameter is the time elapsed from calling the startPreview method until the SDK triggers this callback. final void Function( - RtcConnection connection, int width, int height, int elapsed)? + VideoSourceType videoSourceType, int width, int height, int elapsed)? onFirstLocalVideoFrame; /// Occurs when the first video frame is published.