Skip to content

Commit 9ab28a7

Browse files
committed
fix: MetadataReceived event parameters bug
1 parent 313cddd commit 9ab28a7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Callback.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import io.agora.rtc.RtcEngine
55
import kotlin.math.abs
66

77
abstract class Callback {
8-
fun code(code: Int?, runnable: ((Int) -> Any?)? = null) {
8+
fun code(code: Int?, runnable: ((Int?) -> Any?)? = null) {
99
if (code == null || code < 0) {
1010
val newCode = abs(code ?: Constants.ERR_NOT_INITIALIZED)
1111
failure(newCode.toString(), RtcEngine.getErrorDescription(newCode))

MediaObserver.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ class MediaObserver(
3232

3333
override fun onMetadataReceived(buffer: ByteArray, uid: Int, timeStampMs: Long) {
3434
emit(hashMapOf(
35-
"buffer" to String(buffer),
36-
"uid" to uid,
37-
"timeStampMs" to timeStampMs
35+
"data" to arrayListOf(String(buffer), uid, timeStampMs)
3836
))
3937
}
4038
}

0 commit comments

Comments
 (0)