Commit e9037c13 by 严久程

接口参数

parent ebe6578a
...@@ -5,7 +5,7 @@ ext { ...@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.48.47", "m-confide" : "0.0.48.48",
"m-consultant" : "0.0.59.10", "m-consultant" : "0.0.59.10",
"m-fm" : "0.0.29.9", "m-fm" : "0.0.29.9",
"m-user" : "0.0.60.8", "m-user" : "0.0.60.8",
...@@ -39,7 +39,7 @@ ext { ...@@ -39,7 +39,7 @@ ext {
"ydl-webview" : "0.0.38.31", "ydl-webview" : "0.0.38.31",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9", "ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.21", "m-audioim" : "0.0.49.22",
"ydl-flutter-base": "0.0.14.14", "ydl-flutter-base": "0.0.14.14",
//以下 几乎不会动 //以下 几乎不会动
...@@ -122,7 +122,7 @@ ext { ...@@ -122,7 +122,7 @@ ext {
"ydl-webview" : "0.0.38.31", "ydl-webview" : "0.0.38.31",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9", "ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.21", "m-audioim" : "0.0.49.22",
"ydl-flutter-base": "0.0.14.14", "ydl-flutter-base": "0.0.14.14",
//以下 几乎不会动 //以下 几乎不会动
......
...@@ -191,17 +191,16 @@ class AudioHomeActivity : ...@@ -191,17 +191,16 @@ class AudioHomeActivity :
runOnUiThread { runOnUiThread {
when (warn) { when (warn) {
103, 105, 107 -> { 103, 105, 107 -> {
YDLavManager.instances.callEndStatusUpdate(
channelId!!,
4,
"收到频道回调警告信息$warn"
)
writeAgoraLog("通话挂断:网络异常(${warn})") writeAgoraLog("通话挂断:网络异常(${warn})")
showToast("当前网络较差,请更换网络!") showToast("当前网络较差,请更换网络!")
//通话结束或挂断时,上传日志文件 //通话结束或挂断时,上传日志文件
uploadLog() uploadLog()
leaveChannel() leaveChannel()
YDLavManager.instances.callEndStatusUpdate(
channelId!!,
4,
"收到频道回调警告信息$warn"
)
} }
} }
} }
...@@ -303,12 +302,12 @@ class AudioHomeActivity : ...@@ -303,12 +302,12 @@ class AudioHomeActivity :
super.onConnectionStateChanged(state, reason) super.onConnectionStateChanged(state, reason)
// 3 网络连接被服务器中止 该情况现在是因为后端踢人逻辑 // 3 网络连接被服务器中止 该情况现在是因为后端踢人逻辑
if (reason == 3) { if (reason == 3) {
YDLavManager.instances.callEndStatusUpdate(channelId!!, 4, "服务端踢人触发的回调")
writeAgoraLog("通话结束:原因(${reason})") writeAgoraLog("通话结束:原因(${reason})")
com.yidianling.common.tools.ToastUtil.toastShort("专家已挂断") com.yidianling.common.tools.ToastUtil.toastShort("专家已挂断")
//通话结束或挂断时,上传日志文件 //通话结束或挂断时,上传日志文件
uploadLog() uploadLog()
leaveChannel() leaveChannel()
YDLavManager.instances.callEndStatusUpdate(channelId!!, 4, "服务端踢人触发的回调")
} }
} }
...@@ -517,11 +516,11 @@ class AudioHomeActivity : ...@@ -517,11 +516,11 @@ class AudioHomeActivity :
return@setOnClickListener return@setOnClickListener
} }
if (isConnectSuccess) { if (isConnectSuccess) {
YDLavManager.instances.callEndStatusUpdate(channelId!!, 3, "主叫主动挂断")
writeAgoraLog("已接通:主叫主动挂断") writeAgoraLog("已接通:主叫主动挂断")
updateExpertStatus(false, 1) updateExpertStatus(false, 1)
leaveChannel() leaveChannel()
uploadLog() uploadLog()
YDLavManager.instances.callEndStatusUpdate(channelId!!, 3, "主叫主动挂断")
} else { } else {
userCloseCalling() userCloseCalling()
} }
......
...@@ -473,7 +473,6 @@ class YDLavManager { ...@@ -473,7 +473,6 @@ class YDLavManager {
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ .subscribe({
LogUtil.d("callEndStatusUpdate success")
}, { }, {
LogUtil.d("callEndStatusUpdate error: ${it.message}") LogUtil.d("callEndStatusUpdate error: ${it.message}")
}) })
......
...@@ -97,7 +97,7 @@ class AudioApiRequestUtil { ...@@ -97,7 +97,7 @@ class AudioApiRequestUtil {
return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).listenToken(NetworkParamsUtils.getMaps(cmd)) return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).listenToken(NetworkParamsUtils.getMaps(cmd))
} }
fun callEndStatusUpdate(channelId: String, endStatus: Int, msg: String): Observable<BaseResponse<Any>> { fun callEndStatusUpdate(channelId: String, endStatus: Int, msg: String): Observable<BaseAPIResponse<Any>> {
return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).callEndStatusUpdate(channelId, endStatus, msg) return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).callEndStatusUpdate(channelId, endStatus, msg)
} }
} }
......
...@@ -69,8 +69,8 @@ interface AudioNetAPi { ...@@ -69,8 +69,8 @@ interface AudioNetAPi {
fun listenToken(@FieldMap map: Map<String, String>): Observable<BaseResponse<ListenTokenBean>> fun listenToken(@FieldMap map: Map<String, String>): Observable<BaseResponse<ListenTokenBean>>
@Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA)
@GET("message/call-end/agora") @GET("message/call-end/agora")
fun callEndStatusUpdate(@Query("channelId") channelId:String,@Query("endStatus") endStatus:Int,@Query("msg") msg:String): Observable<BaseResponse<Any>> @Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun callEndStatusUpdate(@Query("channelId") channelId:String,@Query("endStatus") endStatus:Int,@Query("msg") msg:String): Observable<BaseAPIResponse<Any>>
} }
\ No newline at end of file
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 to comment