diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index d4c593d8c..22298060a 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -2,6 +2,7 @@ package com.yunbao.live.dialog; import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid; +import static com.yunbao.live.views.LiveRoomViewHolder.mStream; import android.content.DialogInterface; import android.graphics.Color; @@ -66,7 +67,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { private String roomId; private DialogInterface.OnShowListener listener; private TextView htmlError; - private boolean isSetHeight =false; + private boolean isSetHeight = false; public LiveHDDialogFragment() { @@ -180,7 +181,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { findViewById(R.id.title_laout).setVisibility(View.VISIBLE); } if (bundle.getInt("height", -1) != -1) { - isSetHeight =true; + isSetHeight = true; LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, bundle.getInt("height", -1)); mWebView.setLayoutParams(params); } @@ -189,7 +190,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment { params.width = bundle.getInt("width", -1); mWebView.setLayoutParams(params); } - mWebView.loadUrl(bundle.getString("url")); + String url = bundle.getString("url"); + url += "&anchorUid=" + mLiveUid+"&stream="+mStream; + mWebView.loadUrl(url); mWebView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { @@ -201,7 +204,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { @Override public void onPageFinished(WebView view, String url) { - if(!isSetHeight) { + if (!isSetHeight) { view.loadUrl("javascript:window.androidObject.setHeight(document.body.clientHeight,document.body.clientWidth,true)"); } if (listener != null) { @@ -236,7 +239,6 @@ public class LiveHDDialogFragment extends AbsDialogFragment { } - private void gotoLive(final String live_id) { if (!TextUtils.equals(roomId, live_id)) { LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() { @@ -250,7 +252,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { if (liveBean == null) { return; } - if(MicStatusManager.getInstance().isMic(liveUid)){ + if (MicStatusManager.getInstance().isMic(liveUid)) { MicStatusManager.getInstance().showDownMicDialog(mContext); return; } @@ -341,7 +343,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { dismiss(); ((LiveAudienceActivity) mContext).openGiftWindow(); } else if (TextUtils.equals(event.getMethod(), "androidGoBack")) { - dismiss(); + // dismiss(); } else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) { if (mContext instanceof LiveRyAnchorActivity) { return; @@ -363,13 +365,13 @@ public class LiveHDDialogFragment extends AbsDialogFragment { ); } //守護 - }else if(TextUtils.equals(event.getMethod(), "BuyProtection")){ + } else if (TextUtils.equals(event.getMethod(), "BuyProtection")) { ((LiveActivity) mContext).openNewBuyGuardWindow(event.getData()); - }else if(TextUtils.equals(event.getMethod(), "BuyVIP")){ + } else if (TextUtils.equals(event.getMethod(), "BuyVIP")) { UserBean u = CommonAppConfig.getInstance().getUserBean(); String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&uid=" - + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+"&active="+event.getData()+ "&anchorUid=" + mLiveUid; + + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&active=" + event.getData() + "&anchorUid=" + mLiveUid; ZhuangBanActivity.forward(mContext, url, false); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 73d800acb..4b8bf6f34 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -212,7 +212,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private ImageView avatarOther; private View mBtnRedPack; public static String mLiveUid; - private static String mStream; + public static String mStream; private LiveLightAnimPresenter mLightAnimPresenter; private LiveEnterRoomAnimPresenter mLiveEnterRoomAnimPresenter; private LiveDanmuPresenter mLiveDanmuPresenter;