观看时长问题修改

This commit is contained in:
18401019693 2023-12-15 15:16:09 +08:00
parent 302b789970
commit 0dc1009661
4 changed files with 18 additions and 13 deletions

View File

@ -481,6 +481,7 @@ public class LiveNetManager {
* @param liveUid
*/
public void leaveRoomNew(String stream, String liveUid, HttpCallback<String> callback) {
Log.e("观看时长","leaveRoomNew-----------------------"+liveUid);
API.get().pdLiveApi(mContext)
.leaveRoomNew("g" + liveUid, stream)
.subscribeOn(Schedulers.io())

View File

@ -22,8 +22,6 @@ import com.opensource.svgaplayer.SVGADrawable;
import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity;
import com.tencent.imsdk.v2.V2TIMCallback;
import com.tencent.imsdk.v2.V2TIMManager;
import com.umeng.analytics.MobclickAgent;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
@ -65,9 +63,6 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import io.rong.imlib.IRongCoreCallback;
import io.rong.imlib.IRongCoreEnum;
import io.rong.imlib.chatroom.base.RongChatRoomClient;
import pl.droidsonroids.gif.GifImageView;
/**
@ -637,6 +632,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
private void gotoLive(String live_id) {
dismiss();
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.party_studio), new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {

View File

@ -1826,6 +1826,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 重置数据
*/
public void resetView() {
countdownHandler.removeCallbacks(countdownRunnable);
svgaImageViewHashMap.clear();
pa_pao_layout.removeAllViews();
timeHandler.removeCallbacks(timeRunnable);
@ -5061,7 +5062,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
countdownHandler.post(countdownRunnable);
}
}
Log.e("多人Pk", "upDataPkScore mPkTimeCount:" +mPkTimeCount);
for (int i = 0; i < pkScores.size(); i++) {
JSONObject score = pkScores.getJSONObject(i);
String userNiceName = score.getString("user_nicename");
@ -5152,8 +5153,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void run() {
mPkTimeCount--;
if (mPkTimeCount > 0) {//
Log.e("多人Pk", "countdownRunnable mPkTimeCount:" +mPkTimeCount);
String s1 = StringUtil.getDurationText(mPkTimeCount * 1000);
textTime.setText(String.format(mContext.getString(R.string.pk_time), s1));
Log.e("多人Pk", "countdownRunnable s1:" +s1);
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
} else {
mPkTimeCount = 0;

View File

@ -246,11 +246,13 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveAudienceViewHolder.setGiftRemainingQuantity(giftRemainingQuantity);
}
}
public void setHotNum(String hotNum) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setHotNum(hotNum);
}
}
public PortraitLiveManager(Activity context, Intent intent) {
this.mContext = context;
this.mIntent = intent;
@ -447,6 +449,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void run() {
//加入房间发送Im消息
LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid());
Log.e("观看时长","userJoinRoomNew-----------------------"+mLiveBean.getUid());
}
};
@ -459,6 +462,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
.enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback<EnterRoomNewModel>() {
@Override
public void onSuccess(EnterRoomNewModel data) {
Log.e("观看时长","enterRoomNew-----------------------"+ mLiveBean.getUid());
isEnterRoom = true;
if (TextUtils.isEmpty(leaveStream)) {
leaveStream = mLiveBean.getStream();
@ -686,6 +690,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}
upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time"));
Log.e("多人Pk", "enterRoomNew drpk_time:" + pkInfo.getIntValue("drpk_time"));
}
// mLivePlayViewHolder.setLayoutInterface(new LivePlayRyViewHolder.PlayViewLayoutInterface() {
// @Override
@ -1850,7 +1855,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
@Override
public void onSuccess(String data) {
Log.e("直播间接口调用排查","leaveRoomNew---------------");
}
@Override