Commit c8869ad9 by 万齐军

yx2.0

parent c18cbb51
......@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version = '1.2.3'
constrait_support_version = '1.0.2'
componentVersion = "0.3.0.42.4-SNAPSHOT"
componentVersion = "0.3.0.47.4-SNAPSHOT"
}
repositories {
mavenCentral()
......
......@@ -60,7 +60,7 @@ dependencies {
api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
implementation('com.netease.yunxin.kit:call-ui:1.5.9-SNAPSHOT') {
implementation('com.netease.yunxin.kit:call-ui:1.6.3') {
exclude group: "com.netease.nimlib", module: "avsignalling"
exclude group: "com.netease.nimlib", module: "basesdk"
}
......
......@@ -80,9 +80,12 @@ public class NimUICallInit {
// .p2pAudioActivity(TestActivity.class)
// .p2pVideoActivity(TestActivity.class)
// 请求 rtc token 服务,若非安全模式则不需设置
.rtcTokenService((uid, callback) -> requestRtcToken(uid, callback)) // 自己实现的 token 请求方法
.rtcTokenService((uid, channel, callback) -> requestRtcToken(uid, channel, callback)) // 自己实现的 token 请求方法
// 设置初始化 rtc sdk 相关配置,按照所需进行配置
.rtcSdkOption(new NERtcOption())
.enableMsgFilter(false)
.enableCustomParser(false)
.audio2VideoConfirm(true)
// 呼叫组件初始化 rtc 范围,true-全局初始化,false-每次通话进行初始化以及销毁
// 全局初始化有助于更快进入首帧页面,当结合其他组件使用时存在rtc初始化冲突可设置false
.rtcInitScope(true)
......@@ -92,10 +95,10 @@ public class NimUICallInit {
}
@SuppressLint("CheckResult")
private static void requestRtcToken(long uid, RequestCallback<String> callback) {
private static void requestRtcToken(long uid, String channel, RequestCallback<String> callback) {
Map<String, String> body = new HashMap<>();
if (curChannelName != null) {
body.put("channelName", curChannelName);
if (channel != null) {
body.put("channelName", channel);
}
body.put("uid", String.valueOf(uid));
ImHttpImpl.Companion.getInstance().getImApi().nim2Token(body)
......
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