add[声望升级-多人PK]
This commit is contained in:
@@ -153,20 +153,22 @@ public class SWManager extends BaseCacheManager {
|
||||
switch (selectClarity) {
|
||||
case 0:
|
||||
cfg.dimensions = VideoEncoderConfiguration.VD_840x480;
|
||||
L.eSw("VideoEncoderConfiguration.VD_840x480");
|
||||
break;
|
||||
case 1:
|
||||
cfg.dimensions = VideoEncoderConfiguration.VD_1280x720;
|
||||
L.eSw("VideoEncoderConfiguration.VD_1280x720");
|
||||
break;
|
||||
case 2:
|
||||
cfg.dimensions = VideoEncoderConfiguration.VD_1920x1080;
|
||||
L.eSw("VideoEncoderConfiguration.VD_1920x1080");
|
||||
break;
|
||||
case 3:
|
||||
cfg.dimensions = VideoEncoderConfiguration.VD_320x240;
|
||||
L.eSw("VideoEncoderConfiguration.VD_320x240");
|
||||
break;
|
||||
}
|
||||
mRtcEngine.setVideoEncoderConfiguration(cfg);
|
||||
// 创建一个 SurfaceView 对象,并将其作为 FrameLayout 的子对象
|
||||
SurfaceView surfaceView = new SurfaceView(mContext);
|
||||
anchorContainer.addView(surfaceView);
|
||||
// 设置视图
|
||||
mRtcEngine.setupLocalVideo(new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_HIDDEN, uid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +243,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