添加了接口控制文字消息和语音的展示
This commit is contained in:
parent
58b2d69601
commit
2aa50ecfc7
@ -48,7 +48,7 @@ public class SudGameSmallPopupPindow extends AttachPopupView {
|
||||
return;
|
||||
}
|
||||
if (sudGameUserModel.getMicStatus() == 3) {
|
||||
ToastUtil.show("对方未开麦!");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "對方未開麥!" : "The other side did not turn on the microphone");
|
||||
return;
|
||||
}
|
||||
if (!mute) {
|
||||
|
@ -126,6 +126,20 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat);
|
||||
gameCloseWheat.setVisibility(View.INVISIBLE);
|
||||
|
||||
|
||||
mProcessResultUtil = new ProcessResultUtil(this);
|
||||
LiveNetManager.get(mContext)
|
||||
.getRoomMicStatus(new HttpCallback<RoomMicStatusModel>() {
|
||||
@Override
|
||||
public void onSuccess(RoomMicStatusModel data) {
|
||||
gameMicManager = new GameMicManager();
|
||||
gameMicManager.attachView(SudGameActivity.this);
|
||||
gameMicManager.config(SudGameActivity.this);
|
||||
//语音
|
||||
if (TextUtils.equals(data.getMicStatus(), "1")) {
|
||||
imOff = true;
|
||||
gameSeat.setVisibility(View.VISIBLE);
|
||||
userList.setVisibility(View.VISIBLE);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -140,24 +154,8 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
}
|
||||
}
|
||||
}, 1500);
|
||||
mProcessResultUtil = new ProcessResultUtil(this);
|
||||
LiveNetManager.get(mContext)
|
||||
.getRoomMicStatus(new HttpCallback<RoomMicStatusModel>() {
|
||||
@Override
|
||||
public void onSuccess(RoomMicStatusModel data) {
|
||||
gameMicManager = new GameMicManager();
|
||||
gameMicManager.attachView(SudGameActivity.this);
|
||||
gameMicManager.config(SudGameActivity.this);
|
||||
//语音
|
||||
if (TextUtils.equals(data.getMicStatus(), "1")) {
|
||||
imOff = true;
|
||||
|
||||
gameCloseWheat.setVisibility(View.VISIBLE);
|
||||
gameSeat.setVisibility(View.VISIBLE);
|
||||
userList.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
imOff = false;
|
||||
gameCloseWheat.setVisibility(View.GONE);
|
||||
gameSeat.setVisibility(View.GONE);
|
||||
userList.setVisibility(View.GONE);
|
||||
}
|
||||
@ -189,11 +187,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (gameMicManager != null) {
|
||||
gameMicManager.leaveRoom();
|
||||
gameMicManager.detachView();
|
||||
}
|
||||
if (imOff) {
|
||||
|
||||
LiveNetManager.get(mContext)
|
||||
.leaveMic(mLiveUid, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
@ -206,8 +200,11 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (gameMicManager != null) {
|
||||
gameMicManager.leaveRoom();
|
||||
gameMicManager.detachView();
|
||||
}
|
||||
Bus.getOff(this);
|
||||
|
||||
super.onDestroy();
|
||||
|
Loading…
Reference in New Issue
Block a user