主播开播问题
This commit is contained in:
parent
f9d26a6d56
commit
1a186ac8cf
@ -683,10 +683,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void endLives() {
|
public void endLives() {
|
||||||
//断开socket
|
|
||||||
if (mSocketRyClient != null) {
|
|
||||||
mSocketRyClient.disConnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
RCRTCEngine.getInstance().getDefaultVideoStream().stopCamera(new IRCRTCResultCallback() {
|
RCRTCEngine.getInstance().getDefaultVideoStream().stopCamera(new IRCRTCResultCallback() {
|
||||||
@Override
|
@Override
|
||||||
@ -762,10 +759,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
|
|
||||||
SocketRyChatUtil.closeLive(datas.getString("votes"), datas.getString("length"), datas.getString("nums"), mLiveUid, mSocketRyClient);
|
SocketRyChatUtil.closeLive(datas.getString("votes"), datas.getString("length"), datas.getString("nums"), mLiveUid, mSocketRyClient);
|
||||||
|
|
||||||
//断开socket
|
|
||||||
if (mSocketRyClient != null) {
|
|
||||||
mSocketRyClient.disConnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mLiveEndViewHolder == null) {
|
if (mLiveEndViewHolder == null) {
|
||||||
mLiveEndViewHolder = new LiveEndViewHolder(mContext, mRoot, mLiveBean.getUid());
|
mLiveEndViewHolder = new LiveEndViewHolder(mContext, mRoot, mLiveBean.getUid());
|
||||||
@ -786,8 +779,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
}
|
}
|
||||||
mLivePushViewHolder = null;
|
mLivePushViewHolder = null;
|
||||||
mLiveLinkMicPresenter = null;
|
mLiveLinkMicPresenter = null;
|
||||||
|
|
||||||
|
|
||||||
release();
|
release();
|
||||||
mStartLive = false;
|
mStartLive = false;
|
||||||
} else {
|
} else {
|
||||||
@ -848,6 +839,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
mLiveReadyViewHolder = null;
|
mLiveReadyViewHolder = null;
|
||||||
mLivePushViewHolder = null;
|
mLivePushViewHolder = null;
|
||||||
mLiveLinkMicPresenter = null;
|
mLiveLinkMicPresenter = null;
|
||||||
|
//断开socket
|
||||||
|
if (mSocketRyClient != null) {
|
||||||
|
mSocketRyClient.disConnect();
|
||||||
|
}
|
||||||
super.release();
|
super.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
package com.yunbao.live.adapter;
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.bean.LiveFunctionBean;
|
import com.yunbao.live.bean.LiveFunctionBean;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -35,23 +36,14 @@ public class LiveFunctionAdapter extends RecyclerView.Adapter<LiveFunctionAdapte
|
|||||||
mList = new ArrayList<>();
|
mList = new ArrayList<>();
|
||||||
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_BEAUTY, R.mipmap.icon_live_func_beauty, R.string.live_beauty));
|
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_BEAUTY, R.mipmap.icon_live_func_beauty, R.string.live_beauty));
|
||||||
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_CAMERA, R.mipmap.icon_live_func_camera, R.string.live_camera));
|
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_CAMERA, R.mipmap.icon_live_func_camera, R.string.live_camera));
|
||||||
// mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_MIRROR, R.mipmap.icon_horizontally, R.string.live_camera_s));
|
|
||||||
|
|
||||||
// mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_FLASH, openFlash ? R.mipmap.icon_live_func_flash : R.mipmap.icon_live_func_flash_1, R.string.live_flash));
|
|
||||||
// mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_MUSIC, R.mipmap.icon_live_func_music, R.string.live_music));
|
|
||||||
// mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_SHARE, R.mipmap.icon_live_func_share, R.string.live_share));
|
|
||||||
|
|
||||||
// // TODO: 2019-11-15
|
|
||||||
// if (hasGame) {//含有游戏
|
|
||||||
// mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_GAME, R.mipmap.icon_live_func_game, R.string.live_game));
|
|
||||||
// }
|
|
||||||
// mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_RED_PACK, R.mipmap.icon_live_func_rp, R.string.live_red_pack));
|
|
||||||
|
|
||||||
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_LINK_MIC, R.mipmap.icon_danrenpk, R.string.live_link_pk));
|
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_LINK_MIC, R.mipmap.icon_danrenpk, R.string.live_link_pk));
|
||||||
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_DR, R.mipmap.icon_duorenpk, R.string.live_dr));
|
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_DR, R.mipmap.icon_duorenpk, R.string.live_dr));
|
||||||
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_MIC, R.mipmap.icon_microphone, R.string.live_mic));
|
if (!(context instanceof LiveRyAnchorActivity)) {
|
||||||
|
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_MIC, R.mipmap.icon_microphone, R.string.live_mic));
|
||||||
|
}
|
||||||
|
|
||||||
if(LiveRyAnchorActivity.mLivePushViewHolder!=null ) {
|
|
||||||
|
if (LiveRyAnchorActivity.mLivePushViewHolder != null) {
|
||||||
if (LiveRyAnchorActivity.leave == 0) {
|
if (LiveRyAnchorActivity.leave == 0) {
|
||||||
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_ZSLK, R.mipmap.icon_leave, R.string.live_zslk));
|
mList.add(new LiveFunctionBean(Constants.LIVE_FUNC_ZSLK, R.mipmap.icon_leave, R.string.live_zslk));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1902,7 +1902,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
|||||||
public void run() {
|
public void run() {
|
||||||
// try {
|
// try {
|
||||||
// Thread.sleep(4000);
|
// Thread.sleep(4000);
|
||||||
if ( LiveAudienceActivity.getmLivePlayViewHolder() != null) {
|
if (mContext instanceof LiveAudienceActivity && LiveAudienceActivity.getmLivePlayViewHolder() != null) {
|
||||||
LiveAudienceActivity.getmLivePlayViewHolder().setPkEndview();
|
LiveAudienceActivity.getmLivePlayViewHolder().setPkEndview();
|
||||||
}
|
}
|
||||||
// } catch (InterruptedException e) {
|
// } catch (InterruptedException e) {
|
||||||
|
@ -62,7 +62,8 @@ public class SocketRyChatUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Message message) {
|
public void onSuccess(Message message) {
|
||||||
Log.i("tx", "发送成功");
|
Log.i("tx", "发送成功");
|
||||||
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
|
if (SocketRyClient.mSocketHandler != null)
|
||||||
|
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user