update 中英文
fix 播放器监测
This commit is contained in:
parent
9ff382e35b
commit
3150489384
@ -21,6 +21,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
import com.yunbao.common.views.LiveNewWishGiftPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@ -149,7 +150,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show("修改成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -181,7 +182,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show("修改成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -200,7 +201,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show("修改成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -100,7 +101,11 @@ public class IMRTCManager {
|
||||
public void onSuccess() {
|
||||
callback.onSuccess();
|
||||
if (!RandomPkManager.getInstance().isRandomModel()) {
|
||||
if(WordUtil.isNewZh()) {
|
||||
ToastUtil.show("发起邀请成功");
|
||||
}else{
|
||||
ToastUtil.show("successful");
|
||||
}
|
||||
}
|
||||
requestUid.add(liveUid);
|
||||
startRequestTimeoutTask(liveUid);
|
||||
@ -109,7 +114,11 @@ public class IMRTCManager {
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode errorCode) {
|
||||
if (!RandomPkManager.getInstance().isRandomModel()) {
|
||||
if(WordUtil.isNewZh()) {
|
||||
ToastUtil.show("邀请失败 " + errorCode.getValue());
|
||||
}else{
|
||||
ToastUtil.show("invite failed:" +errorCode.getValue());
|
||||
}
|
||||
}
|
||||
if (RandomPkManager.getInstance().isRequestPk()) {
|
||||
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_REFUSE);
|
||||
|
@ -39,15 +39,15 @@ public class NobleUtil {
|
||||
}
|
||||
public static String nobleIdToStringNameForEn(int id){
|
||||
switch (id){
|
||||
case 1:return "baron";
|
||||
case 2:return "viscount";
|
||||
case 3:return "marquis";
|
||||
case 4:return "duke";
|
||||
case 5:return "king";
|
||||
case 6:return "emperor";
|
||||
case 7:return "SuperEmperor";
|
||||
case 1:return "Baron";
|
||||
case 2:return "Viscount";
|
||||
case 3:return "Marquis";
|
||||
case 4:return "Duke";
|
||||
case 5:return "King";
|
||||
case 6:return "Emperor";
|
||||
case 7:return "SuperKing";
|
||||
}
|
||||
return "Not Opened";
|
||||
return "Not opened";
|
||||
}
|
||||
public static int getNobleBackgroundId(int id){
|
||||
switch (id){
|
||||
|
@ -43,7 +43,7 @@ public class ToastUtil {
|
||||
|
||||
|
||||
public static void show(int res) {
|
||||
show(WordUtil.getString(res));
|
||||
show(WordUtil.getNewString(res));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,7 @@ import com.lxj.xpopup.animator.PopupAnimator;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
/**
|
||||
@ -85,7 +86,7 @@ public class InputCustomPopup extends CenterPopupView {
|
||||
public void onViewClicks() {
|
||||
String textContent = content.getText().toString();
|
||||
if (TextUtils.isEmpty(textContent)) {
|
||||
ToastUtil.show("输入内容不可为空");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"输入内容不可为空":"The input cannot be empty");
|
||||
return;
|
||||
}
|
||||
if (listener != null) {
|
||||
|
@ -32,6 +32,7 @@ import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@ -332,7 +333,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show("修改成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1084,7 +1084,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_become_fans_medal">One-time gift ≥2000 diamonds), can obtain fan privilege yo</string>
|
||||
<string name="live_go_charge">Top up</string>
|
||||
<string name="live_user_card_level">User level</string>
|
||||
<string name="live_noble_level_anchor">aristocracy</string>
|
||||
<string name="live_noble_level_anchor">Noble\nLevel</string>
|
||||
<string name="live_noble_fens_anchor">Fan club</string>
|
||||
<string name="live_anchor_open_mic">Voice connection is not enabled</string>
|
||||
<string name="live_honor_number_anchor">Wall of honor</string>
|
||||
@ -1320,4 +1320,6 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_send_red_packge_fans_group">Join a fans club</string>
|
||||
<string name="live_pk_link_error">Sorry, your network failed to pull the other party.</string>
|
||||
<string name="live_user_dialog_tips">say something</string>
|
||||
<string name="live_free_pk_empty_tips">No match was found</string>
|
||||
<string name="live_gift_dialog_select_add">Add</string>
|
||||
</resources>
|
||||
|
@ -1317,4 +1317,6 @@
|
||||
|
||||
<string name="live_pk_link_error">抱歉,您的網絡不佳拉取對方畫面失敗</string>
|
||||
<string name="live_user_dialog_tips">這家夥很懶,什麽都沒留下</string>
|
||||
<string name="live_free_pk_empty_tips">沒有找到匹配結果~</string>
|
||||
<string name="live_gift_dialog_select_add">確定添加</string>
|
||||
</resources>
|
||||
|
@ -1316,4 +1316,6 @@
|
||||
|
||||
<string name="live_pk_link_error">抱歉,您的網絡不佳拉取對方畫面失敗</string>
|
||||
<string name="live_user_dialog_tips">這家夥很懶,什麽都沒留下</string>
|
||||
<string name="live_free_pk_empty_tips">沒有找到匹配結果~</string>
|
||||
<string name="live_gift_dialog_select_add">確定添加</string>
|
||||
</resources>
|
||||
|
@ -1316,4 +1316,6 @@
|
||||
<string name="live_send_red_packge_fans_group">加入粉絲團</string>
|
||||
<string name="live_pk_link_error">抱歉,您的網絡不佳拉取對方畫面失敗</string>
|
||||
<string name="live_user_dialog_tips">這家夥很懶,什麽都沒留下</string>
|
||||
<string name="live_free_pk_empty_tips">沒有找到匹配結果~</string>
|
||||
<string name="live_gift_dialog_select_add">確定添加</string>
|
||||
</resources>
|
||||
|
@ -1084,7 +1084,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_become_fans_medal">One-time gift ≥2000 diamonds), can obtain fan privilege yo</string>
|
||||
<string name="live_go_charge">Top up</string>
|
||||
<string name="live_user_card_level">User level</string>
|
||||
<string name="live_noble_level_anchor">aristocracy</string>
|
||||
<string name="live_noble_level_anchor">Noble\nLevel</string>
|
||||
<string name="live_noble_fens_anchor">Fan club</string>
|
||||
<string name="live_anchor_open_mic">Voice connection is not enabled</string>
|
||||
<string name="live_honor_number_anchor">Wall of honor</string>
|
||||
@ -1323,4 +1323,6 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_pk_link_error">Sorry, your network failed to pull the other party.</string>
|
||||
|
||||
<string name="live_user_dialog_tips">say something</string>
|
||||
<string name="live_free_pk_empty_tips">No match was found</string>
|
||||
<string name="live_gift_dialog_select_add">Add</string>
|
||||
</resources>
|
||||
|
@ -70,6 +70,7 @@ import com.yunbao.common.utils.LogUtil;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.LiveNewWishListPopup;
|
||||
import com.yunbao.common.views.LiveRobotSettingCustomPopup;
|
||||
import com.yunbao.faceunity.FaceManager;
|
||||
@ -1244,7 +1245,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
});
|
||||
//todo 安卓端状态码说明文档:https://docs.rongcloud.cn/v4/views/rtc/call/code/android.html
|
||||
Log.e("ry", rtcErrorCode + "aaaaaa" + CommonAppConfig.getInstance().getUid() + "VDSSSS" + pkUid);
|
||||
if(WordUtil.isNewZh()) {
|
||||
ToastUtil.show("邀请 " + pkUid + " 发送失败 :" + rtcErrorCode);
|
||||
}else{
|
||||
ToastUtil.show("invite " + pkUid + " failed:"+rtcErrorCode);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -1293,7 +1298,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (!extra.equals(SOCKET_LIVE_DRPK_RANDOM)) {
|
||||
if(WordUtil.isNewZh()) {
|
||||
ToastUtil.show("邀请 " + pkUid + " 发送成功");
|
||||
}else{
|
||||
ToastUtil.show("invite " + pkUid + " successful");
|
||||
}
|
||||
}
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
@ -221,9 +221,15 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
||||
}
|
||||
if (bean.getType() == TYPE_MIC_REQUEST) {
|
||||
mBtn.setText("同意");
|
||||
if(!WordUtil.isNewZh()){
|
||||
mBtn.setText("agree");
|
||||
}
|
||||
mBtn.setBackgroundResource(R.drawable.bg_anchor_mic_info_btn_ok);
|
||||
} else if (bean.getType() == TYPE_MIC_INVITE) {
|
||||
mBtn.setText("邀请");
|
||||
if (!WordUtil.isNewZh()) {
|
||||
mBtn.setText("invite");
|
||||
}
|
||||
mBtn.setBackgroundResource(R.drawable.bg_anchor_mic_info_btn_invite);
|
||||
}
|
||||
ImgLoader.display(mContext, bean.getAvatar(), mAvatar);
|
||||
|
@ -130,13 +130,13 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
|
||||
}
|
||||
});
|
||||
if(!WordUtil.isNewZh()){
|
||||
mPkNumText.setText("Free PK remaining number");
|
||||
mPkNumText.setText("Free PK number");
|
||||
((TextView)findViewById(R.id.tmp_text2)).setText("Updated daily at 6am");
|
||||
}
|
||||
if (mDrPkNum != -1) {
|
||||
mPkNumText.setText("多人PK剩余次數");
|
||||
if(!WordUtil.isNewZh()){
|
||||
mPkNumText.setText("multi-user PK remaining number");
|
||||
mPkNumText.setText("multi-user PK number");
|
||||
}
|
||||
}
|
||||
initRecycler();
|
||||
|
@ -22,6 +22,7 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
@ -118,7 +119,7 @@ public class LiveNewWishListDialogFragment extends AbsDialogFragment implements
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
ToastUtil.show("修改成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
dismiss();
|
||||
} else {
|
||||
ToastUtil.show("修改失败" + (msg.isEmpty() ? "" : msg));
|
||||
|
@ -18,6 +18,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
@ -117,7 +118,7 @@ public class LiveWishListDialogFragment extends AbsDialogFragment implements OnI
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
ToastUtil.show("修改成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"修改成功":"Success");
|
||||
dismiss();
|
||||
} else {
|
||||
ToastUtil.show("修改失败" + (msg.isEmpty() ? "" : msg));
|
||||
|
@ -57,6 +57,7 @@ import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
@ -857,7 +858,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
@Override
|
||||
public void onSuccess(RCRTCOtherRoom rcrtcOtherRoom) {
|
||||
rcrtcOtherRoom.registerOtherRoomEventsListener(otherRoomEventsListener);
|
||||
ToastUtil.show("接受成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success");
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
for (int i = 0; i < rcrtcOtherRoom.getRemoteUsers().size(); i++) {
|
||||
@ -976,7 +977,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
@Override
|
||||
public void onSuccess(RCRTCOtherRoom rcrtcOtherRoom) {
|
||||
rcrtcOtherRoom.registerOtherRoomEventsListener(otherRoomEventsListener);
|
||||
ToastUtil.show("接受成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success");
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
Log.e("ry", liveid + "来了!!!!" + rcrtcOtherRoom.getRemoteUsers().size());
|
||||
@ -1659,7 +1660,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
}
|
||||
|
||||
Log.e("ry", "多人接受成功" + mApplyUid);
|
||||
ToastUtil.show("接受成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"接受成功":"Success");
|
||||
//遍历远端用户列表
|
||||
for (int i = 0; i < rcrtcOtherRoom.getRemoteUsers().size(); i++) {
|
||||
Log.e("ry", rcrtcOtherRoom.getRemoteUsers().get(i).getUserId() + "收到rcrtcOtherRoom" + rcrtcOtherRoom.getRemoteUsers().size());
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.yunbao.live.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@ -18,9 +20,13 @@ import com.google.android.exoplayer2.analytics.AnalyticsListener;
|
||||
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
|
||||
import com.google.android.exoplayer2.ui.StyledPlayerView;
|
||||
import com.google.android.exoplayer2.video.VideoSize;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/**
|
||||
* 直播间播放器管理器
|
||||
* 通过预加载子播放器来实现无缝切换分辨率功能
|
||||
@ -40,6 +46,9 @@ public class LiveExoPlayerManager {
|
||||
private static double log_buffer_time = 0, log_buffer_max_time;
|
||||
private String url = "";
|
||||
private Context mContext;
|
||||
private TimerTask task;
|
||||
|
||||
TextView debugText;
|
||||
|
||||
public LiveExoPlayerManager(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
@ -59,6 +68,109 @@ public class LiveExoPlayerManager {
|
||||
handler = new Handler(Looper.getMainLooper());
|
||||
setListener();
|
||||
setAnalyticsListener();
|
||||
//createDeBugDialog();
|
||||
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
|
||||
private void createTask() {
|
||||
if (task != null) {
|
||||
return;
|
||||
}
|
||||
task = new TimerTask() {
|
||||
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (index > 5 && !player1.isPlaying() && !player2.isPlaying()) {
|
||||
index = 0;
|
||||
Log.i(TAG, "5秒内播放器没有播放,重新播放");
|
||||
ToastUtil.showDebug("强制重播");
|
||||
handler.removeCallbacks(buffRunnable);
|
||||
replay();
|
||||
cancel();
|
||||
} else if (player1.isPlaying() || player2.isPlaying()) {
|
||||
index = 0;
|
||||
} else {
|
||||
index++;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
cancel();
|
||||
task = null;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
new Timer().schedule(task, 0, 1000);
|
||||
}
|
||||
|
||||
private TimerTask debugTask;
|
||||
|
||||
private void createDeBugDialog() {
|
||||
debugText = new TextView(mContext);
|
||||
debugText.setText(getDebugText());
|
||||
debugText.setBackgroundColor(Color.WHITE);
|
||||
debugText.setTextColor(Color.BLACK);
|
||||
EasyFloat.with(mContext)
|
||||
.setTag("debug")
|
||||
.setLayout(debugText)
|
||||
.show();
|
||||
debugTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateDebug();
|
||||
}
|
||||
};
|
||||
new Timer().schedule(debugTask, 0, 500);
|
||||
}
|
||||
|
||||
private String getDebugText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try {
|
||||
sb.append("player1: ").append(getPlayStateText(player1)).append("|").append(player1.isPlaying()).append("\n");
|
||||
sb.append("player2: ").append(getPlayStateText(player2)).append("|").append(player2.isPlaying()).append("\n");
|
||||
sb.append("卡顿计数器:").append(playBufferIndex).append("\n");
|
||||
sb.append("强制播放计时器:").append(index).append("\n");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
EasyFloat.dismiss("debug");
|
||||
debugTask.cancel();
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private void updateDebug() {
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
debugText.setText(getDebugText());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private String getPlayStateText(ExoPlayer player) {
|
||||
switch (player.getPlaybackState()) {
|
||||
case Player.STATE_READY:
|
||||
return "STATE_READY";
|
||||
case Player.STATE_BUFFERING:
|
||||
return "STATE_BUFFERING";
|
||||
case Player.STATE_ENDED:
|
||||
return "STATE_ENDED";
|
||||
case Player.STATE_IDLE:
|
||||
return "STATE_IDLE";
|
||||
default:
|
||||
return player.getPlaybackState() + "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -171,6 +283,7 @@ public class LiveExoPlayerManager {
|
||||
if (listener != null) {
|
||||
listener.onIsPlayingChanged(true);
|
||||
}
|
||||
createTask();
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,6 +358,7 @@ public class LiveExoPlayerManager {
|
||||
if (listener != null) {
|
||||
listener.onIsPlayingChanged(true);
|
||||
}
|
||||
createTask();
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,6 +394,11 @@ public class LiveExoPlayerManager {
|
||||
*/
|
||||
public void startUrl(String url) {
|
||||
if (url != null && url.equals(this.url)) return;
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
task = null;
|
||||
}
|
||||
|
||||
Log.i(TAG, "startUrl: " + url + " > " + mainView.getResizeMode());
|
||||
handler.removeCallbacks(buffRunnable);
|
||||
this.url = url;
|
||||
@ -303,6 +422,10 @@ public class LiveExoPlayerManager {
|
||||
*/
|
||||
public void switchUrl(String url) {
|
||||
if (url != null && url.equals(this.url)) return;
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
task = null;
|
||||
}
|
||||
Log.i(TAG, "switchUrl: " + url + " src : " + this.url);
|
||||
this.url = url;
|
||||
playBufferIndex = 0;
|
||||
@ -369,6 +492,14 @@ public class LiveExoPlayerManager {
|
||||
if (getNextPlayer() != null) {
|
||||
getNextPlayer().stop();
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onPlaybackStateChanged(Player.STATE_IDLE);
|
||||
}
|
||||
handler.removeCallbacks(buffRunnable);
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
task = null;
|
||||
}
|
||||
String tmp = url;
|
||||
url = null;
|
||||
startUrl(tmp);
|
||||
@ -394,6 +525,13 @@ public class LiveExoPlayerManager {
|
||||
player2.clearVideoSurface();
|
||||
player2.release();
|
||||
}
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
task = null;
|
||||
}
|
||||
if (debugTask != null) {
|
||||
debugTask.cancel();
|
||||
}
|
||||
player1 = null;
|
||||
player2 = null;
|
||||
mainView.setKeepContentOnPlayerReset(false);
|
||||
|
@ -218,7 +218,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder {
|
||||
if (mTime != null) {
|
||||
Log.i("vvvs", content);
|
||||
if (content.trim().equals("00:00")) {
|
||||
mTime.setText("結算中");
|
||||
mTime.setText(WordUtil.isNewZh()?"結算中":"waiting");
|
||||
} else {
|
||||
mTime.setText(content);
|
||||
}
|
||||
|
@ -1287,6 +1287,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
Player.Listener.super.onIsPlayingChanged(isPlaying);
|
||||
if (isPlaying) {
|
||||
hideCover();
|
||||
mLoading.setVisibility(View.INVISIBLE);
|
||||
Log.i(TAG, "onIsPlayingChanged: 开始播放 | waitNextUrl = " + waitNextUrl);
|
||||
OkDownload.getInstance().startAll();
|
||||
if (loadingListener != null) {
|
||||
|
@ -495,7 +495,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
btn_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
DialogUitl.showSimpleDialog(mContext, "是否要斷開連麥?", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()? "是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
aheadOfScheduleEndPK(mPkUid, CommonAppConfig.getInstance().getUserBean().getUserNiceName(), (String) tv_avatarOther_name.getTag());
|
||||
|
@ -36,6 +36,7 @@ import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
@ -103,7 +104,7 @@ public class LivePushTxViewHolder extends AbsLivePushViewHolder implements ITXLi
|
||||
btn_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
DialogUitl.showSimpleDialog(mContext, "是否要斷開連麥?", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh()?"是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
//断开连麦
|
||||
|
@ -681,7 +681,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
AppManager.runDebugCode(() -> {
|
||||
liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000);
|
||||
// liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000);
|
||||
});
|
||||
liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000);
|
||||
if (TextUtils.equals(data.getEnterRoomInfo().getIsconnection(), "1")) {
|
||||
|
@ -48,15 +48,17 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/giftInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:text="@string/live_fans_group_buy_info"
|
||||
android:textColor="#B3000000"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/giftName"
|
||||
android:text="@string/live_fans_group_buy_info" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/giftName" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/giftList"
|
||||
|
@ -29,7 +29,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_live_prank_gift_add"
|
||||
android:gravity="center"
|
||||
android:text="确定添加"
|
||||
android:text="@string/live_gift_dialog_select_add"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -505,13 +505,15 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:src="@mipmap/img_fans_default"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
@ -190,7 +190,7 @@
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="結束連麥"
|
||||
android:text="@string/live_link_mic_3"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone" />
|
||||
|
@ -135,7 +135,7 @@
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="結束連麥"
|
||||
android:text="@string/live_link_mic_3"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone" />
|
||||
|
@ -19,7 +19,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:text="沒有找到匹配結果~"
|
||||
android:text="@string/live_free_pk_empty_tips"
|
||||
android:textColor="#C4C4C4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -244,7 +244,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
|
||||
LiveHttpUtil.getLiveSdk(mGetLiveSdkCallback);
|
||||
});
|
||||
} else {
|
||||
String tips="需要下载开播插件,是否下载";
|
||||
String tips="需要下載開播插件,是否下載";
|
||||
if(!WordUtil.isNewZh()){
|
||||
tips="You need to download the plug-in, whether to download";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user