diff --git a/common/src/main/java/com/yunbao/common/bean/EnterRoomInfoModel.java b/common/src/main/java/com/yunbao/common/bean/EnterRoomInfoModel.java index 1e5cab634..f1210fcf3 100644 --- a/common/src/main/java/com/yunbao/common/bean/EnterRoomInfoModel.java +++ b/common/src/main/java/com/yunbao/common/bean/EnterRoomInfoModel.java @@ -118,7 +118,7 @@ public class EnterRoomInfoModel extends BaseModel { @SerializedName("is_first_entry") private String isFirstEntry; - @SerializedName("s_new_user") + @SerializedName("is_new_user") private String isNewUser; @SerializedName("is_com_all") private String isComAll; diff --git a/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java b/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java index a01742d88..ffd248caa 100644 --- a/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java @@ -51,7 +51,7 @@ public class DateFormatUtil { } public static String getDiffInMilliseconds(String time1, String time2) { - return String.valueOf((Long.parseLong(time1) - Long.parseLong(time2)) / (60 * 1000)); + return String.valueOf((Long.parseLong(time2) - Long.parseLong(time1)) / (60 * 1000)); } diff --git a/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java b/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java index d777f6ca0..4112f9fd7 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java @@ -21,6 +21,7 @@ import com.yunbao.common.bean.HttpCallbackModel; import com.yunbao.common.bean.LiveAiRobotBean; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.L; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; @@ -66,11 +67,12 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View findViewById(R.id.automatic_greeting_setting).setOnClickListener(this); robotNameText.setOnClickListener(this); robotState.setOnClickListener(this); - + robotNameSetting.setImeOptions(EditorInfo.IME_ACTION_DONE); robotNameSetting.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { + L.e("EditorInfo.IME_ACTION_DONE"); // 修改助手名字 LiveNetManager.get(getContext()) .setAiRobotDate("ai_name", robotNameSetting.getText().toString(), new HttpCallback() { diff --git a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java index 1defc06b1..3a6e7aada 100644 --- a/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java +++ b/lib_faceunity/src/main/java/io/agora/beautyapi/faceunity/agora/SWManager.java @@ -1,12 +1,10 @@ package io.agora.beautyapi.faceunity.agora; + import android.app.Activity; -import android.content.ContentResolver; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; -import android.net.Uri; -import android.text.TextUtils; import android.view.SurfaceView; import android.widget.FrameLayout; @@ -17,7 +15,6 @@ import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.SwTokenModel; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; -import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.base.BaseCacheManager; import com.yunbao.common.utils.L; import com.yunbao.common.utils.StringUtil; @@ -151,7 +148,7 @@ public class SWManager extends BaseCacheManager { cfg.frameRate = 20; cfg.bitrate = 0; //镜像 - cfg.mirrorMode = VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_ENABLED; + cfg.mirrorMode = VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED; //设置竖屏 cfg.orientationMode = VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_FIXED_PORTRAIT; @@ -216,22 +213,27 @@ public class SWManager extends BaseCacheManager { } } - /** * 设置镜像模式 */ public void setMirrorMode() { if (cfg != null && mRtcEngine != null) { - L.eSw("setMirrorMode设置镜像" + cfg.mirrorMode); - if (cfg.mirrorMode == VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_ENABLED) { - cfg.mirrorMode = VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED; //取消镜像 + if (cfg.mirrorMode == VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED) { + cfg.mirrorMode = VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_AUTO; //设置镜像 } else { - cfg.mirrorMode = VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_ENABLED; //设置镜像 + cfg.mirrorMode = VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED; //取消镜像 } + L.eSw("setMirrorMode设置镜像" + cfg.mirrorMode); mRtcEngine.setVideoEncoderConfiguration(cfg); SurfaceView surfaceView = new SurfaceView(mContext); anchorContainer.addView(surfaceView); - mRtcEngine.setupLocalVideo(new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_HIDDEN, uid)); + VideoCanvas videoCanvas =new VideoCanvas(surfaceView, VideoCanvas.RENDER_MODE_HIDDEN, uid); + if(cfg.mirrorMode == VideoEncoderConfiguration.MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED){ + videoCanvas.mirrorMode = Constants.VIDEO_MIRROR_MODE_DISABLED; + }else{ + videoCanvas.mirrorMode = Constants.VIDEO_MIRROR_MODE_ENABLED; + } + mRtcEngine.setupLocalVideo(videoCanvas); } } diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index 93e5a00ec..9ffffe5c7 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -1017,7 +1017,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveEndViewHolder.subscribeActivityLifeCycle(); mLiveEndViewHolder.addToParent(); mLiveEndViewHolder.showData(mLiveBean, mStream); - mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")),datas.getString("level"),datas.getString("votestotal"),datas.getString("level_up"),datas.getString("next_level_exp"),datas.getString("starttime"),datas.getString("endtime"),datas.getString("hot_strategy")); + mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")),datas.getString("level"),datas.getString("votestotal"),datas.getString("level_up"),datas.getString("next_level_exp"),datas.getString("starttime")+"000",datas.getString("endtime")+"000",datas.getString("hot_strategy")); if (banEvent != null) { mLiveEndViewHolder.showBanDownLive(banEvent); banEvent = null; diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index 4fcd1820a..cc91e258e 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -729,12 +729,11 @@ public class LiveChatAdapter extends RecyclerView.Adapter { if (bean == null) { return; } - - - mList.remove(bean.getHeart()); - notifyItemRemoved(bean.getHeart()); - notifyItemRangeChanged(bean.getHeart(), getItemCount()); - + if(bean.getHeart() yaoqing = new HashMap<>(); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index e32ffee11..2a752952d 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -906,6 +906,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe //初始化整蠱列表 mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2); mLiveRoomViewHolder.setComAll(data.getEnterRoomInfo().getIsComAll().equals("1")); + L.e("getIsFirstEntry:"+data.getEnterRoomInfo().getIsFirstEntry()); + L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser()); + L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention()); //检测是否是首次观看该直播间 if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")&&data.getEnterRoomInfo().getIsNewUser().equals("1")&&data.getEnterRoomInfo().getIsattention().equals("0")){ mLiveRoomViewHolder.firstLookLiveNotify(); diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 6a43d304e..b85e77e62 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -3265,7 +3265,6 @@ android:layout_alignParentBottom="true" android:layout_marginStart="35dp" android:layout_marginEnd="65dp" - android:layout_toEndOf="@+id/notify_gift_receive_icon" android:ellipsize="marquee" android:scrollHorizontally="true" android:layout_marginBottom="5dp" diff --git a/live/src/main/res/layout/view_ry_live_anchor.xml b/live/src/main/res/layout/view_ry_live_anchor.xml index 9e942a9e8..8d25fa29e 100644 --- a/live/src/main/res/layout/view_ry_live_anchor.xml +++ b/live/src/main/res/layout/view_ry_live_anchor.xml @@ -10,7 +10,7 @@ android:id="@+id/live_time" android:layout_width="wrap_content" android:layout_height="23dp" - android:layout_marginTop="90dp" + android:layout_marginTop="88dp" android:layout_gravity="end" android:layout_centerVertical="true" android:layout_marginEnd="10dp" diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index c480a76c9..a81ad7f7a 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -339,6 +339,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi SVGADrawable drawable = new SVGADrawable(videoItem); gift_svga.setImageDrawable(drawable); SVGAViewUtils.playEndClear(gift_svga, false); + gift_svga.setVisibility(View.VISIBLE); } @Override @@ -349,7 +350,12 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi e.printStackTrace(); } } else { - ImgLoader.display(mContext, u.getDress().getAvatar_frame(), gift_svga); + if(StringUtil.isEmpty(u.getDress().getAvatar_frame())){ + gift_svga.setVisibility(View.GONE); + }else{ + gift_svga.setVisibility(View.VISIBLE); + ImgLoader.display(mContext, u.getDress().getAvatar_frame(), gift_svga); + } } }