add[声望升级-多人PK]
This commit is contained in:
@@ -192,7 +192,7 @@ public class SWAuManager extends BaseCacheManager {
|
||||
// 创建 ChannelMediaOptions 对象,并进行配置
|
||||
ChannelMediaOptions options = new ChannelMediaOptions();
|
||||
// 根据场景将用户角色设置为 AUDIENCE (观众)
|
||||
options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER;
|
||||
options.clientRoleType = Constants.CLIENT_ROLE_AUDIENCE;
|
||||
options.autoSubscribeVideo = true;
|
||||
options.autoSubscribeAudio = true;
|
||||
options.publishMicrophoneTrack = false;
|
||||
@@ -213,7 +213,7 @@ public class SWAuManager extends BaseCacheManager {
|
||||
SurfaceView surfaceView = new SurfaceView(mContext);
|
||||
surfaceView.setZOrderMediaOverlay(true);
|
||||
frameLayout.addView(surfaceView);
|
||||
VideoCanvas videoCanvas = new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_FIT,Integer.parseInt(toUid));
|
||||
VideoCanvas videoCanvas = new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_HIDDEN,Integer.parseInt(toUid));
|
||||
mRtcEngine.setupRemoteVideoEx(videoCanvas, rtcConnection);
|
||||
}
|
||||
});
|
||||
@@ -244,6 +244,13 @@ public class SWAuManager extends BaseCacheManager {
|
||||
mRtcEngine.leaveChannelEx(rtcConnection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出所有的直播间
|
||||
*/
|
||||
public void exitChannelAll(){
|
||||
mRtcEngine.leaveChannel();
|
||||
}
|
||||
|
||||
public static String getChannelName(String liveUid) {
|
||||
if(liveUid.contains("g")){
|
||||
return liveUid;
|
||||
|
||||
@@ -300,7 +300,7 @@ public class SWManager extends BaseCacheManager {
|
||||
// 创建 ChannelMediaOptions 对象,并进行配置
|
||||
ChannelMediaOptions options = new ChannelMediaOptions();
|
||||
// 根据场景将用户角色设置为 AUDIENCE (观众)
|
||||
options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER;
|
||||
options.clientRoleType = Constants.CLIENT_ROLE_AUDIENCE;
|
||||
options.autoSubscribeVideo = true;
|
||||
options.autoSubscribeAudio = true;
|
||||
options.publishMicrophoneTrack = false;
|
||||
|
||||
Reference in New Issue
Block a user