Skip to content

Commit

Permalink
fix: MetadataReceived event parameters bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Dec 18, 2020
1 parent 313cddd commit 9ab28a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Callback.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 1 addition & 3 deletions MediaObserver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
))
}
}

0 comments on commit 9ab28a7

Please sign in to comment.