Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccim_sdk_android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
ccim_sdk_android
Commits
4aae5817
Commit
4aae5817
authored
Sep 14, 2022
by
sheteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语音房间 3
parent
d8ca40ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
ccim/src/main/java/com/ccwangluo/ccim/CCIMClient.java
ccim/src/main/java/com/ccwangluo/ccim/CCIMClient.java
+8
-0
ccim/src/main/java/com/ccwangluo/ccim/audio/JanusService.java
.../src/main/java/com/ccwangluo/ccim/audio/JanusService.java
+4
-1
No files found.
ccim/src/main/java/com/ccwangluo/ccim/CCIMClient.java
View file @
4aae5817
...
@@ -680,6 +680,9 @@ public class CCIMClient {
...
@@ -680,6 +680,9 @@ public class CCIMClient {
JanusConfImpl
conf
=
new
JanusConfImpl
();
JanusConfImpl
conf
=
new
JanusConfImpl
();
conf
.
url
(
audioServer
);
conf
.
url
(
audioServer
);
conf
.
plugin
(
JanusPlugins
.
VIDEOROOM
);
conf
.
plugin
(
JanusPlugins
.
VIDEOROOM
);
if
(
janusService
!=
null
)
{
janusService
.
stop
();
}
janusService
=
new
JanusService
(
context
,
roomId
,
user
,
callback
);
janusService
=
new
JanusService
(
context
,
roomId
,
user
,
callback
);
janusService
.
start
(
context
,
conf
);
janusService
.
start
(
context
,
conf
);
}
}
...
@@ -690,9 +693,14 @@ public class CCIMClient {
...
@@ -690,9 +693,14 @@ public class CCIMClient {
public
void
exitAudioRoom
()
{
public
void
exitAudioRoom
()
{
if
(
janusService
!=
null
)
{
if
(
janusService
!=
null
)
{
janusService
.
stop
();
janusService
.
stop
();
janusService
=
null
;
}
}
}
}
/**
* 是否禁言自己
* @param enable
*/
public
void
setLocalAudio
(
boolean
enable
)
{
public
void
setLocalAudio
(
boolean
enable
)
{
if
(
janusService
!=
null
)
{
if
(
janusService
!=
null
)
{
janusService
.
setLocalAudio
(
enable
);
janusService
.
setLocalAudio
(
enable
);
...
...
ccim/src/main/java/com/ccwangluo/ccim/audio/JanusService.java
View file @
4aae5817
...
@@ -58,6 +58,7 @@ public class JanusService extends JanusDelegate {
...
@@ -58,6 +58,7 @@ public class JanusService extends JanusDelegate {
this
.
callback
=
callback
;
this
.
callback
=
callback
;
if
(
audioManager
!=
null
)
{
if
(
audioManager
!=
null
)
{
audioManager
.
setMode
(
AudioManager
.
MODE_IN_COMMUNICATION
);
audioManager
.
setMode
(
AudioManager
.
MODE_IN_COMMUNICATION
);
// audioManager.adjustStreamVolume (AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI);
// audioManager.setSpeakerphoneOn(true);
// audioManager.setSpeakerphoneOn(true);
}
}
}
}
...
@@ -129,7 +130,9 @@ public class JanusService extends JanusDelegate {
...
@@ -129,7 +130,9 @@ public class JanusService extends JanusDelegate {
@Override
@Override
public
void
onMediaChanged
(
MediaBundle
media
)
{
public
void
onMediaChanged
(
MediaBundle
media
)
{
audioTrack
=
media
.
localAudioTrack
();
if
(
media
.
localAudioTrack
()
!=
null
)
{
audioTrack
=
media
.
localAudioTrack
();
}
}
}
@Override
@Override
...
...
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