Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
c8869ad9
Commit
c8869ad9
authored
Aug 26, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
yx2.0
parent
c18cbb51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
build.gradle
build.gradle
+1
-1
build.gradle
m-im/build.gradle
+1
-1
NimUICallInit.java
m-im/src/main/java/com/yidianling/im/helper/NimUICallInit.java
+7
-4
No files found.
build.gradle
View file @
c8869ad9
...
...
@@ -14,7 +14,7 @@ buildscript {
ydlrouter_version
=
'1.2.3'
constrait_support_version
=
'1.0.2'
componentVersion
=
"0.3.0.4
2
.4-SNAPSHOT"
componentVersion
=
"0.3.0.4
7
.4-SNAPSHOT"
}
repositories
{
mavenCentral
()
...
...
m-im/build.gradle
View file @
c8869ad9
...
...
@@ -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"
}
...
...
m-im/src/main/java/com/yidianling/im/helper/NimUICallInit.java
View file @
c8869ad9
...
...
@@ -80,9 +80,12 @@ public class NimUICallInit {
// .p2pAudioActivity(TestActivity.class)
// .p2pVideoActivity(TestActivity.class)
// 请求 rtc token 服务,若非安全模式则不需设置
.
rtcTokenService
((
uid
,
c
allback
)
->
requestRtcToken
(
uid
,
callback
))
// 自己实现的 token 请求方法
.
rtcTokenService
((
uid
,
c
hannel
,
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
(
c
urChannelName
!=
null
)
{
body
.
put
(
"channelName"
,
c
urChannelName
);
if
(
c
hannel
!=
null
)
{
body
.
put
(
"channelName"
,
c
hannel
);
}
body
.
put
(
"uid"
,
String
.
valueOf
(
uid
));
ImHttpImpl
.
Companion
.
getInstance
().
getImApi
().
nim2Token
(
body
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment