Skip to content

Commit 70cb58e

Browse files
committed
fix: mobile RtcStats key error
1 parent dee5ab9 commit 70cb58e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

android/src/main/java/io/agora/rtc/base/Extensions.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fun LocalAudioStats.toMap(): Map<String, Any?> {
2222

2323
fun RtcStats.toMap(): Map<String, Any?> {
2424
return hashMapOf(
25-
"totalDuration" to totalDuration,
25+
"duration" to totalDuration,
2626
"txBytes" to txBytes,
2727
"rxBytes" to rxBytes,
2828
"txAudioBytes" to txAudioBytes,
@@ -35,7 +35,7 @@ fun RtcStats.toMap(): Map<String, Any?> {
3535
"rxAudioKBitRate" to rxAudioKBitRate,
3636
"txVideoKBitRate" to txVideoKBitRate,
3737
"rxVideoKBitRate" to rxVideoKBitRate,
38-
"users" to users,
38+
"userCount" to users,
3939
"lastmileDelay" to lastmileDelay,
4040
"txPacketLossRate" to txPacketLossRate,
4141
"rxPacketLossRate" to rxPacketLossRate,

ios/Classes/Base/Extensions.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extension AgoraRtcLocalAudioStats {
3232
extension AgoraChannelStats {
3333
func toMap() -> [String: Any?] {
3434
return [
35-
"totalDuration": duration,
35+
"duration": duration,
3636
"txBytes": txBytes,
3737
"rxBytes": rxBytes,
3838
"txAudioBytes": txAudioBytes,
@@ -45,7 +45,7 @@ extension AgoraChannelStats {
4545
"rxAudioKBitRate": rxAudioKBitrate,
4646
"txVideoKBitRate": txVideoKBitrate,
4747
"rxVideoKBitRate": rxVideoKBitrate,
48-
"users": userCount,
48+
"userCount": userCount,
4949
"lastmileDelay": lastmileDelay,
5050
"txPacketLossRate": txPacketLossRate,
5151
"rxPacketLossRate": rxPacketLossRate,

0 commit comments

Comments
 (0)