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
f02775dc
Commit
f02775dc
authored
Apr 22, 2022
by
upwork.021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 通话组件升级
parent
bec981f5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
56 deletions
+29
-56
config.gradle
config.gradle
+2
-2
build.gradle
ydl-tuicore/build.gradle
+9
-9
TRTCCalling.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
+1
-1
TRTCBaseActivity.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/TRTCBaseActivity.java
+2
-4
VideoCallingActivity.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/VideoCallingActivity.java
+6
-18
YDLInvitionActivity.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
+9
-22
No files found.
config.gradle
View file @
f02775dc
...
...
@@ -33,8 +33,8 @@ ext {
//-------------- 功能组件 --------------
//mdt 组件
"ydl-tuicore"
:
"0.0.
9
"
,
"m-tuicore-ydl"
:
"0.0.10"
,
"ydl-tuicore"
:
"0.0.
12
"
,
//
"m-tuicore-ydl" : "0.0.10",
//第一步
"ydl-platform"
:
"0.0.40.90"
,
...
...
ydl-tuicore/build.gradle
View file @
f02775dc
...
...
@@ -47,15 +47,15 @@ dependencies {
implementation
(
rootProject
.
ext
.
dependencies
[
"okhttp3"
])
implementation
(
rootProject
.
ext
.
dependencies
[
"glide"
])
implementation
(
rootProject
.
ext
.
dependencies
[
"gson"
])
if
(
rootProject
.
ext
.
dev_mode
){
//开发时使用
api
project
(
':ydl-platform'
)
}
else
{
//发布时使用
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
transitive
=
true
}
}
//
if (rootProject.ext.dev_mode){
//
//开发时使用
// implementation
project(':ydl-platform')
//
}else {
//
//发布时使用
// implementation
(rootProject.ext.dependencies["ydl-platform"]) {
//
transitive = true
//
}
//
}
implementation
"com.blankj:utilcode:1.25.9"
api
"com.tencent.liteav:LiteAVSDK_TRTC:latest.release"
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
View file @
f02775dc
...
...
@@ -320,7 +320,7 @@ public class TRTCCalling {
@Override
public
void
onReceiveNewInvitation
(
String
inviteID
,
String
inviter
,
String
groupID
,
List
<
String
>
inviteeList
,
String
data
)
{
TRTCLogger
.
d
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
TRTCLogger
.
e
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
+
", groupID:"
+
groupID
+
", inviteeList:"
+
inviteeList
+
" data:"
+
data
);
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/TRTCBaseActivity.java
View file @
f02775dc
...
...
@@ -5,15 +5,13 @@ import android.content.pm.PackageManager;
import
android.os.Build
;
import
android.widget.Toast
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.core.app.ActivityCompat
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
java.util.ArrayList
;
import
java.util.List
;
public
abstract
class
TRTCBaseActivity
extends
Base
Activity
{
public
abstract
class
TRTCBaseActivity
extends
AppCompat
Activity
{
protected
static
final
int
REQ_PERMISSION_CODE
=
0x1000
;
protected
int
mGrantedCount
=
0
;
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/VideoCallingActivity.java
View file @
f02775dc
...
...
@@ -19,7 +19,6 @@ import com.tencent.rtmp.ui.TXCloudVideoView;
import
com.tencent.trtc.TRTCCloud
;
import
com.tencent.trtc.TRTCCloudDef
;
import
com.tencent.trtc.TRTCCloudListener
;
import
com.yidianling.common.tools.LogUtil
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
...
...
@@ -65,22 +64,11 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
private
String
mUserId
;
private
boolean
mAudioRouteFlag
=
true
;
@Override
protected
void
initDataAndEvent
()
{
handleIntent
();
}
@Override
protected
int
layoutResId
()
{
return
R
.
layout
.
videocall_activity_calling
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
handleIntent
();
setContentView
(
R
.
layout
.
videocall_activity_calling
);
if
(
checkPermission
())
{
initView
();
enterRoom
();
...
...
@@ -107,7 +95,7 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
btnVideo
=
findViewById
(
R
.
id
.
btn_video
);
btnAudio
=
findViewById
(
R
.
id
.
btn_audio
);
btnVideo
.
setSelected
(
true
);
btnAudio
.
setSelected
(
tru
e
);
btnAudio
.
setSelected
(
fals
e
);
ivVideo
=
findViewById
(
R
.
id
.
iv_video
);
ivAudio
=
findViewById
(
R
.
id
.
iv_audio
);
tvLeave
=
findViewById
(
R
.
id
.
tv_leave
);
...
...
@@ -161,7 +149,7 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
trtcParams
.
sdkAppId
=
userModel
.
appId
;
trtcParams
.
userId
=
mUserId
;
trtcParams
.
roomId
=
Integer
.
parseInt
(
mRoomId
);
Log
Util
.
d
(
"userSig"
,
userModel
.
userSig
);
Log
.
d
(
"userSig"
,
userModel
.
userSig
);
trtcParams
.
userSig
=
userModel
.
userSig
;
mTRTCCloud
.
startLocalPreview
(
mIsFrontCamera
,
mTXCVVLocalPreviewView
);
...
...
@@ -241,10 +229,10 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
boolean
isSelected
=
btnAudio
.
isSelected
();
if
(!
isSelected
)
{
mTRTCCloud
.
muteLocalAudio
(
true
);
ivAudio
.
setImageResource
(
R
.
drawable
.
trtccalling_ic_me_audio_
open
);
ivAudio
.
setImageResource
(
R
.
drawable
.
trtccalling_ic_me_audio_
close
);
}
else
{
mTRTCCloud
.
muteLocalAudio
(
false
);
ivAudio
.
setImageResource
(
R
.
drawable
.
trtccalling_ic_me_audio_
close
);
ivAudio
.
setImageResource
(
R
.
drawable
.
trtccalling_ic_me_audio_
open
);
}
btnAudio
.
setSelected
(!
isSelected
);
}
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
View file @
f02775dc
...
...
@@ -48,21 +48,11 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
}
@Override
protected
void
initDataAndEvent
()
{
handleIntent
();
}
@Override
protected
int
layoutResId
()
{
return
R
.
layout
.
video_invition_activity
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
checkPermission
())
{
initView
(
);
}
handleIntent
();
setContentView
(
R
.
layout
.
video_invition_activity
);
initView
();
}
private
void
handleIntent
()
{
...
...
@@ -107,15 +97,12 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
mIvVideoInviteRefuse
=
findViewById
(
R
.
id
.
iv_video_invite_refuse
);
//接听
mIvVideoInviteAccept
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
YDLInvitionActivity
.
this
,
VideoCallingActivity
.
class
);
intent
.
putExtra
(
Constant
.
ROOM_ID
,
mRoomId
);
intent
.
putExtra
(
Constant
.
USER_ID
,
mUserId
);
startActivity
(
intent
);
finish
();
}
mIvVideoInviteAccept
.
setOnClickListener
(
v
->
{
Intent
intent
=
new
Intent
(
YDLInvitionActivity
.
this
,
VideoCallingActivity
.
class
);
intent
.
putExtra
(
Constant
.
ROOM_ID
,
mRoomId
);
intent
.
putExtra
(
Constant
.
USER_ID
,
mUserId
);
startActivity
(
intent
);
finish
();
});
//拒绝
mIvVideoInviteRefuse
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
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