From 9ab28a7ae559f3bd5ce8ab8e0455860d9de89977 Mon Sep 17 00:00:00 2001 From: HUI Date: Fri, 18 Dec 2020 17:29:41 +0800 Subject: [PATCH] fix: `MetadataReceived` event parameters bug --- Callback.kt | 2 +- MediaObserver.kt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Callback.kt b/Callback.kt index d2dd152c1..0d9b69378 100644 --- a/Callback.kt +++ b/Callback.kt @@ -5,7 +5,7 @@ import io.agora.rtc.RtcEngine import kotlin.math.abs abstract class Callback { - fun code(code: Int?, runnable: ((Int) -> Any?)? = null) { + fun code(code: Int?, runnable: ((Int?) -> Any?)? = null) { if (code == null || code < 0) { val newCode = abs(code ?: Constants.ERR_NOT_INITIALIZED) failure(newCode.toString(), RtcEngine.getErrorDescription(newCode)) diff --git a/MediaObserver.kt b/MediaObserver.kt index 1983ecfc4..fef7214f1 100644 --- a/MediaObserver.kt +++ b/MediaObserver.kt @@ -32,9 +32,7 @@ class MediaObserver( override fun onMetadataReceived(buffer: ByteArray, uid: Int, timeStampMs: Long) { emit(hashMapOf( - "buffer" to String(buffer), - "uid" to uid, - "timeStampMs" to timeStampMs + "data" to arrayListOf(String(buffer), uid, timeStampMs) )) } }