Skip to content

Commit

Permalink
fix: events.dart joinChannelSuccess rejoinChannelSuccess bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Oct 23, 2020
1 parent 263ad09 commit b25771f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/src/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -1054,8 +1055,7 @@ class RtcEngineEventHandler {
joinChannelSuccess?.call(data[0], data[1], data[2]);
break;
case 'RejoinChannelSuccess':
rejoinChannelSuccess
?.call(RtcStats.fromJson(Map<String, dynamic>.from(data[0])));
rejoinChannelSuccess?.call(data[0], data[1], data[2]);
break;
case 'LeaveChannel':
leaveChannel
Expand Down Expand Up @@ -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.
///
Expand All @@ -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.
///
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b25771f

Please sign in to comment.