Commit dea3b668 by huangzhicong

修复因音频绝对地址为空(预留参数)导致无法回调的问题

parent 0dc139b9
......@@ -48,14 +48,14 @@ class RecordAudioContract(fragment: Fragment, proxy: WebViewProxy): IContract(fr
/**
* @param duration 允许最大录制时长(单位: 秒)
*/
fun recordAudio(sessionId: Int, duration: Int?) {
fun recordAudio(sessionId: Int, duration: Int? = null) {
result.setupSessionId(sessionId)
maxDuration = duration ?: 0
requestPermission.launch(Manifest.permission.RECORD_AUDIO)
}
fun onResult(uri: Uri?, path: String?) {
if (uri != null && path != null) {
if (uri != null) {
proxy.audioSuccess(METHOD, result, uri)
} else {
proxy.failed(METHOD, result, "音频地址为空")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment