diff --git a/common/src/main/res/mipmap-xxhdpi/live_bg.jpg b/common/src/main/res/mipmap-xxhdpi/live_bg.jpg index 6d9899eb1..b6cd42cda 100644 Binary files a/common/src/main/res/mipmap-xxhdpi/live_bg.jpg and b/common/src/main/res/mipmap-xxhdpi/live_bg.jpg differ diff --git a/config.gradle b/config.gradle index 7d7250467..cf3f0a090 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", //測試 -// serverHost : "https://ceshi.yaoulive.com", + serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 3dc791d29..ab9e48bfb 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -122,6 +122,7 @@ public class LiveAudienceActivity extends LiveActivity { private ViewGroup mViewGroup; private LoadingView loadingView; + private int liveBg = 0; @Override @@ -651,6 +652,10 @@ public class LiveAudienceActivity extends LiveActivity { manager.onRemove(); mLiveType = e.getLiveType(); mLiveTypeVal = e.getLiveTypeVal(); + mLiveBean = liveBean; + mLiveUid = liveBean.getUid(); + mStream = liveBean.getStream(); + mAncherName = liveBean.getUserNiceName(); manager.onAdd(liveBean, mLiveType, mLiveTypeVal, mLiveSDK); } @@ -679,6 +684,7 @@ public class LiveAudienceActivity extends LiveActivity { bundle.putString("Avatar", mLiveBean.getAvatar()); bundle.putString("banner", GsonUtils.toJson(slideInfoModels)); bundle.putString("list", GsonUtils.toJson(list)); + bundle.putInt("LiveBg", liveBg); sidebarLiveAudience.setArguments(bundle); sidebarLiveAudience.show(getSupportFragmentManager(), "SidebarLiveAudience"); // manager.openDrawer(); @@ -797,6 +803,8 @@ public class LiveAudienceActivity extends LiveActivity { mLiveTypeVal : event.getParametersModel().getmLiveTypeVal(); mLiveGuardInfo = event.getParametersModel().getmLiveGuardInfo() == null ? mLiveGuardInfo : event.getParametersModel().getmLiveGuardInfo(); + liveBg = TextUtils.equals(String.valueOf(liveBg), String.valueOf(event.getParametersModel().getLiveBg())) ? + liveBg : event.getParametersModel().getLiveBg(); break; case ACTIVITY_CENTER://活动中心 String url = CommonAppConfig.HOST + "/h5/live/hallOfFame/index.html?g=Appapi&m=Turntable&a=tricky"; diff --git a/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java b/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java index b30e16ca6..c2f2c738b 100644 --- a/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java +++ b/live/src/main/java/com/yunbao/live/bean/OpenParametersModel.java @@ -15,6 +15,16 @@ public class OpenParametersModel extends BaseModel { //收费价格,计时收费每次扣费的值 private int mLiveTypeVal = 0; private LiveGuardInfo mLiveGuardInfo = null; + private int liveBg = 0; + + public int getLiveBg() { + return liveBg; + } + + public OpenParametersModel setLiveBg(int liveBg) { + this.liveBg = liveBg; + return this; + } public int getmLiveType() { return mLiveType; diff --git a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java index 3cddb178c..8a89393b0 100644 --- a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java +++ b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java @@ -65,12 +65,18 @@ public class SidebarLiveAudience extends AbsDialogFragment { sidebarBack = (ImageView) findViewById(R.id.sidebar_back); if (bundle != null) { String avatar = bundle.getString("Avatar"); + int liveBg = bundle.getInt("LiveBg"); slideInfoModels = GsonUtils.fromJson(bundle.getString("banner"), new TypeToken>() { }.getType()); list = GsonUtils.fromJson(bundle.getString("list"), new TypeToken>() { }.getType()); //侧边栏背景 - ImgLoader.displayBlurLive(mContext, avatar, sidebarBack); + if (liveBg == 1) { + ImgLoader.displayBlurLive(mContext, avatar, sidebarBack); + } else { + ImgLoader.display(mContext, R.mipmap.live_bg, sidebarBack); + } + } sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList); 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 de48feb04..5a4b13f4a 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -4,7 +4,6 @@ import android.app.Activity; import android.app.Dialog; import android.content.Intent; import android.content.res.Configuration; -import android.graphics.drawable.AnimationDrawable; import android.os.CountDownTimer; import android.text.TextUtils; import android.util.Log; @@ -28,7 +27,6 @@ import com.tencent.imsdk.v2.V2TIMManager; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; -import com.yunbao.common.bean.AnchorRecommendItemModel; import com.yunbao.common.bean.UserBean; import com.yunbao.common.custom.MyViewPager; import com.yunbao.common.event.FollowEvent; @@ -150,6 +148,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe private boolean mLighted; private boolean mCoinNotEnough;//余额不足 private boolean mFirstConnectSocket;//是否是第一次连接成功socket + private int liveBg; public PortraitLiveManager(Activity context, Intent intent) { this.mContext = context; @@ -808,13 +807,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mSocketUserType = obj.getIntValue("usertype"); mChatLevel = obj.getIntValue("speak_limit"); mDanMuLevel = obj.getIntValue("barrage_limit"); + liveBg = obj.getIntValue("live_bg"); + if (liveBg == 1) { + //直播间背景 + ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack); + } //回传参数 Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.OPEN_PARAMETERS) .setParametersModel(new OpenParametersModel().setmDanmuPrice(mDanmuPrice) .setmSocketUserType(mSocketUserType) .setmChatLevel(mChatLevel) - .setmDanMuLevel(mDanMuLevel))); + .setmDanMuLevel(mDanMuLevel) + .setLiveBg(liveBg))); EventBus.getDefault().post("close_login"); EventBus.getDefault().post("oneUesrOver"); diff --git a/live/src/main/res/mipmap-xxxhdpi/live_bg.jpg b/live/src/main/res/mipmap-xxxhdpi/live_bg.jpg index 6d9899eb1..b6cd42cda 100644 Binary files a/live/src/main/res/mipmap-xxxhdpi/live_bg.jpg and b/live/src/main/res/mipmap-xxxhdpi/live_bg.jpg differ