From e0d1d086ba96ef35da7e932acd6f461f1163b531 Mon Sep 17 00:00:00 2001 From: HUI Date: Mon, 12 Oct 2020 19:13:09 +0800 Subject: [PATCH] * fix `setDefaultAudioRoutetoSpeakerphone` crash bug * add `setAudioSessionOperationRestriction` and `sendCustomReportMessage` method --- RtcEngine.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/RtcEngine.kt b/RtcEngine.kt index ab27ca1e8..b41037995 100644 --- a/RtcEngine.kt +++ b/RtcEngine.kt @@ -34,6 +34,8 @@ class IRtcEngine { fun getConnectionState(callback: Callback) + fun sendCustomReportMessage(params: Map, callback: Callback) + fun getCallId(callback: Callback) fun rate(params: Map, callback: Callback) @@ -161,6 +163,8 @@ class IRtcEngine { fun resumeEffect(params: Map, callback: Callback) fun resumeAllEffects(callback: Callback) + + fun setAudioSessionOperationRestriction(params: Map, callback: Callback) } interface RtcVoiceChangerInterface { @@ -375,6 +379,10 @@ class RtcEngineManager( callback.resolve(engine) { it.connectionState } } + override fun sendCustomReportMessage(params: Map, callback: Callback) { + callback.code(engine?.sendCustomReportMessage(params["id"] as String, params["category"] as String, params["event"] as String, params["label"] as String, (params["value"] as Number).toInt())) + } + override fun getCallId(callback: Callback) { callback.resolve(engine) { it.callId } } @@ -619,6 +627,10 @@ class RtcEngineManager( callback.code(engine?.audioEffectManager?.resumeAllEffects()) } + override fun setAudioSessionOperationRestriction(params: Map, callback: Callback) { + callback.resolve(engine) { Constants.ERR_NOT_SUPPORTED } + } + override fun setLocalVoiceChanger(params: Map, callback: Callback) { callback.code(engine?.setLocalVoiceChanger((params["voiceChanger"] as Number).toInt())) }