fix[修复BUG]
This commit is contained in:
@@ -125,6 +125,8 @@ public class SWManager extends BaseCacheManager {
|
||||
//设置竖屏
|
||||
cfg.orientationMode = VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_FIXED_PORTRAIT;
|
||||
|
||||
|
||||
|
||||
mRtcEngine.setVideoEncoderConfiguration(cfg);
|
||||
|
||||
// 创建一个 SurfaceView 对象,并将其作为 FrameLayout 的子对象
|
||||
@@ -232,7 +234,8 @@ public class SWManager extends BaseCacheManager {
|
||||
ChannelMediaOptions options = new ChannelMediaOptions();
|
||||
// 设置角色 BROADCASTER (主播) 或 AUDIENCE (观众)
|
||||
options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER;
|
||||
|
||||
options.publishCameraTrack = true;
|
||||
options.publishMicrophoneTrack = true;
|
||||
mRtcEngine.setAudioProfile(Constants.AUDIO_PROFILE_MUSIC_HIGH_QUALITY);
|
||||
mRtcEngine.setAudioScenario(Constants.AUDIO_SCENARIO_GAME_STREAMING);
|
||||
|
||||
@@ -433,6 +436,14 @@ public class SWManager extends BaseCacheManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserOffline(int uid, int reason) {
|
||||
super.onUserOffline(uid, reason);
|
||||
if (onRtcEngineListener != null) {
|
||||
//onRtcEngineListener.onOpenSuccess(channel, uid);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int err) {
|
||||
super.onError(err);
|
||||
@@ -486,6 +497,7 @@ public class SWManager extends BaseCacheManager {
|
||||
|
||||
public interface onRtcEngineListener {
|
||||
void onOpenSuccess(String channel, int uid);
|
||||
void onUserOffline(int uid);
|
||||
}
|
||||
|
||||
public void setPkContainer(FrameLayout pkContainer) {
|
||||
|
||||
Reference in New Issue
Block a user