From b25771f73be3dd8a4ac2cfbce435f78e824ba0e6 Mon Sep 17 00:00:00 2001 From: HUI Date: Fri, 23 Oct 2020 21:32:48 +0800 Subject: [PATCH] fix: events.dart `joinChannelSuccess` `rejoinChannelSuccess` bug --- lib/src/events.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/events.dart b/lib/src/events.dart index 465d81f5f..ab838ff4d 100644 --- a/lib/src/events.dart +++ b/lib/src/events.dart @@ -142,7 +142,7 @@ class RtcEngineEventHandler { /// /// The `RtcStatsCallback` typedef includes the following parameter: /// - [RtcStats] `stats`: Statistics of the call. - RtcStatsCallback rejoinChannelSuccess; + UidWithElapsedAndChannelCallback rejoinChannelSuccess; /// Occurs when a user leaves the channel. /// @@ -296,6 +296,7 @@ class RtcEngineEventHandler { /// /// The `ElapsedCallback` typedef includes the following parameters: /// - [int] `Elapsed`: Time elapsed (ms) from the local user calling the [RtcEngine.joinChannel] until this callback is triggered. + @deprecated ElapsedCallback firstLocalAudioFrame; /// Occurs when the first local video frame is rendered. @@ -1054,8 +1055,7 @@ class RtcEngineEventHandler { joinChannelSuccess?.call(data[0], data[1], data[2]); break; case 'RejoinChannelSuccess': - rejoinChannelSuccess - ?.call(RtcStats.fromJson(Map.from(data[0]))); + rejoinChannelSuccess?.call(data[0], data[1], data[2]); break; case 'LeaveChannel': leaveChannel @@ -1377,7 +1377,7 @@ class RtcChannelEventHandler { /// - [firstRemoteAudioDecoded]: Time elapsed (ms) from the local user calling [RtcEngine.joinChannel] until the SDK triggers this callback. /// - [joinChannelSuccess]: Time elapsed (ms) from the local user calling [RtcChannel.joinChannel] until this callback is triggered. /// - [rejoinChannelSuccess]: Time elapsed (ms) from the local user starting to reconnect until this callback is triggered. - UidWithElapsedCallback joinChannelSuccess; + UidWithElapsedAndChannelCallback joinChannelSuccess; /// Occurs when a user rejoins the channel after being disconnected due to network problems. /// @@ -1396,7 +1396,7 @@ class RtcChannelEventHandler { /// - [firstRemoteAudioDecoded]: Time elapsed (ms) from the local user calling [RtcEngine.joinChannel] until the SDK triggers this callback. /// - [joinChannelSuccess]: Time elapsed (ms) from the local user calling [RtcChannel.joinChannel] until this callback is triggered. /// - [rejoinChannelSuccess]: Time elapsed (ms) from the local user starting to reconnect until this callback is triggered. - UidWithElapsedCallback rejoinChannelSuccess; + UidWithElapsedAndChannelCallback rejoinChannelSuccess; /// Occurs when a user leaves the channel. /// @@ -1652,7 +1652,7 @@ class RtcChannelEventHandler { /// - `uid`: ID of the user who sends the metadata. /// - `timeStampMs`: The timestamp of the metadata. /// - /// The `MetadataCallback` typedef includes the following parameters: + /// The `MetadataCallback` typedef includes the following parameters: /// - [String]: `buffer`: The received metadata. /// - [int]: `uid`: The ID of the user who sent the metadata. /// - [int]: `timeStampMs`: The timestamp (ms) of the received metadata. @@ -1767,10 +1767,10 @@ class RtcChannelEventHandler { error?.call(ErrorCodeConverter.fromValue(data[0]).e); break; case 'JoinChannelSuccess': - joinChannelSuccess?.call(data[0], data[1]); + joinChannelSuccess?.call(data[0], data[1], data[2]); break; case 'RejoinChannelSuccess': - rejoinChannelSuccess?.call(data[0], data[1]); + rejoinChannelSuccess?.call(data[0], data[1], data[2]); break; case 'LeaveChannel': leaveChannel