Skip to content

Commit

Permalink
* fix setDefaultAudioRoutetoSpeakerphone crash bug
Browse files Browse the repository at this point in the history
* add `setAudioSessionOperationRestriction` and `sendCustomReportMessage` method
  • Loading branch information
LichKing-2234 committed Oct 12, 2020
1 parent c82a9e1 commit e0d1d08
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RtcEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class IRtcEngine {

fun getConnectionState(callback: Callback)

fun sendCustomReportMessage(params: Map<String, *>, callback: Callback)

fun getCallId(callback: Callback)

fun rate(params: Map<String, *>, callback: Callback)
Expand Down Expand Up @@ -161,6 +163,8 @@ class IRtcEngine {
fun resumeEffect(params: Map<String, *>, callback: Callback)

fun resumeAllEffects(callback: Callback)

fun setAudioSessionOperationRestriction(params: Map<String, *>, callback: Callback)
}

interface RtcVoiceChangerInterface {
Expand Down Expand Up @@ -375,6 +379,10 @@ class RtcEngineManager(
callback.resolve(engine) { it.connectionState }
}

override fun sendCustomReportMessage(params: Map<String, *>, 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 }
}
Expand Down Expand Up @@ -619,6 +627,10 @@ class RtcEngineManager(
callback.code(engine?.audioEffectManager?.resumeAllEffects())
}

override fun setAudioSessionOperationRestriction(params: Map<String, *>, callback: Callback) {
callback.resolve(engine) { Constants.ERR_NOT_SUPPORTED }
}

override fun setLocalVoiceChanger(params: Map<String, *>, callback: Callback) {
callback.code(engine?.setLocalVoiceChanger((params["voiceChanger"] as Number).toInt()))
}
Expand Down

0 comments on commit e0d1d08

Please sign in to comment.