Commit 111203fe by mReturn

直播调试

parent f88e6950
......@@ -43,6 +43,7 @@ import com.dayu.event.SaleTabNumEvent;
import com.dayu.event.UserInfo;
import com.dayu.learncenter.ui.fragment.HomeLearnFragment;
import com.dayu.livemodule.LiveUtils;
import com.dayu.livemodule.event.UserKickOutEvent;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.common.TabNumEvent;
import com.dayu.order.ui.activity.OrderDetailsActivity;
......@@ -471,6 +472,11 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
}
@Subscribe
public void kickOutUser(UserKickOutEvent event) {
showLoginDialog();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
......
......@@ -32,8 +32,8 @@ public class Constants {
public static final String PROGRAM_PATH = "pages/mallDetail/main?goodsId=gid&userId=uid&type=1"; //小程序路径
public static final String INVITE_NEW_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareMaster?code="; //邀请新人分享链接
public static final String INVITE_NEW_SHARE_URL_BUSINESS = "http://app.dl.kf.ai/ext/#/merchants?code="; //邀请商家分享链接
// public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
// public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
/**
......@@ -56,34 +56,35 @@ public class Constants {
/**
* uat测试环境配置.
*/
public static String ENVIROMENT = "uat";
public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static String BASE_URL = "http://47.95.223.6:3112";
public static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
public static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail";
public static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
public static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult";
public static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop";
public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=test/video";
public static final boolean IS_DEBUG = true;
public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
// public static String ENVIROMENT = "uat";
// public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static String BASE_URL = "http://47.95.223.6:3112";
// public static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
// public static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail";
// public static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
// public static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult";
// public static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop";
// public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=test/video";
// public static final boolean IS_DEBUG = true;
// public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
/**
* 正式环境.
*/
// public static String ENVIROMENT = "release";
// public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
// public static String BASE_URL = "https://mobile.kf.ai";
// public static String WEB_SOP = "https://sop.kf.ai/#/sop";
// public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
// public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
// public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
// public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
// public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
// public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
// public static final boolean IS_DEBUG = false;
// public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
public static String ENVIROMENT = "release";
public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
public static String BASE_URL = "https://mobile.kf.ai";
public static String WEB_SOP = "https://sop.kf.ai/#/sop";
public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
public static final boolean IS_DEBUG = false;
public static final boolean CAN_CHANGE_ENV = false; //是否显示切换开发环境菜单
/**
* 统一配置.
......
......@@ -72,11 +72,16 @@ public class TextDialog {
}
public void showCenterDialog(final Activity activity, List<String> strs,onItemClickListener listener) {
showCenterDialog(activity,R.layout.dialog_text,R.layout.item_dialog_text,strs,listener);
}
public void showCenterDialog(final Activity activity, int viewId,int itemId,List<String> strs,onItemClickListener listener) {
View mView = View.inflate(activity, R.layout.dialog_text , null);
View mView = View.inflate(activity, viewId , null);
RecyclerView recyclerView = mView.findViewById(R.id.rv_text);
BaseQuickAdapter<String,BaseViewHolder> mAdapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_dialog_text,strs) {
BaseQuickAdapter<String,BaseViewHolder> mAdapter = new BaseQuickAdapter<String, BaseViewHolder>(itemId,strs) {
@Override
protected void convert(BaseViewHolder helper, String item) {
helper.setText(R.id.tv_text,item);
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/white"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text='请选择视频片段'
android:layout_margin="15dp"
android:textColor="@color/common_text_color"
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#999"
/>
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_text"
android:layout_margin="15dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text='aaa'
android:textColor="@color/text_common_blue"
android:textSize="@dimen/sp_14" />
\ No newline at end of file
......@@ -9,6 +9,8 @@ import com.dayu.base.ui.activity.BaseActivity;
import com.dayu.base.ui.presenter.SImplePresenter;
import com.dayu.learncenter.R;
import com.dayu.learncenter.databinding.ActivityPrepareLiveBinding;
import com.dayu.livemodule.LiveUtils;
import com.dayu.livemodule.event.UserKickOutEvent;
import com.dayu.livemodule.xiaozhibo.anchor.TCCameraAnchorActivity;
import com.dayu.livemodule.xiaozhibo.common.utils.TCConstants;
import com.dayu.livemodule.xiaozhibo.login.TCUserMgr;
......@@ -19,6 +21,8 @@ import com.luck.picture.lib.PictureSelector;
import com.luck.picture.lib.config.PictureConfig;
import com.luck.picture.lib.entity.LocalMedia;
import org.greenrobot.eventbus.Subscribe;
import java.io.File;
import java.util.List;
......@@ -43,6 +47,7 @@ public class PrepareLiveActivity extends BaseActivity<SImplePresenter, ActivityP
@Override
public void initView() {
LiveUtils.checkUser(this);
mBind.titleBack.setOnClickListener(view -> dumpBack());
mBind.ivCover.setOnClickListener(view -> {
MediaChooseUtils.chooseLiveImg(this);
......@@ -119,4 +124,11 @@ public class PrepareLiveActivity extends BaseActivity<SImplePresenter, ActivityP
startActivity(intent);
finish();
}
@Subscribe
public void kickOutUser(UserKickOutEvent event) {
// showToast("login invalid");
showLoginDialog();
}
}
......@@ -2,13 +2,13 @@ package com.dayu.learncenter.ui.activity;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import com.dayu.base.ui.activity.BaseActivity;
import com.dayu.base.ui.presenter.SImplePresenter;
import com.dayu.learncenter.R;
import com.dayu.learncenter.api.bean.LiveBackVideosBean;
import com.dayu.learncenter.databinding.ActivityVideoPlayBinding;
import com.dayu.utils.GlideImageLoader;
......@@ -16,15 +16,17 @@ import cn.jzvd.JzvdStd;
public class VideoPlayActivity extends BaseActivity<SImplePresenter, ActivityVideoPlayBinding> {
LiveBackVideosBean videoData;
String videoUrl = "";
String imgUrl ="";
@Override
public void setPresenter() {
}
public static void launch(Context context, LiveBackVideosBean videosBean) {
public static void launch(Context context, String videoUrl,String imgUrl) {
Intent intent = new Intent(context, VideoPlayActivity.class);
intent.putExtra("data", videosBean);
intent.putExtra("video", videoUrl);
intent.putExtra("imgurl", imgUrl);
context.startActivity(intent);
}
......@@ -35,18 +37,19 @@ public class VideoPlayActivity extends BaseActivity<SImplePresenter, ActivityVid
@Override
public void initView() {
if (getIntent().hasExtra("data"))
videoData = (LiveBackVideosBean) getIntent().getSerializableExtra("data");
if (getIntent().hasExtra("video"))
videoUrl = getIntent().getStringExtra("video");
if (getIntent().hasExtra("imgurl"))
imgUrl = getIntent().getStringExtra("imgurl");
mBind.jzVideo.fullscreenButton.setVisibility(View.GONE);
mBind.ivBack.setOnClickListener(v->dumpBack());
if (videoData != null) {
String videoUrl = videoData.getVideoUrl();
if (!TextUtils.isEmpty(videoUrl)) {
mBind.jzVideo.setUp(videoUrl, "");
mBind.jzVideo.thumbImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
GlideImageLoader.loadNoDeal(this, mBind.jzVideo.thumbImageView,
videoData.getLiveStreamPic(), R.drawable.icon_video_default);
imgUrl, R.drawable.icon_video_default);
mBind.jzVideo.startVideo();
}
}
......
......@@ -21,7 +21,6 @@ import com.dayu.learncenter.databinding.FragmentHomeLearnBinding;
import com.dayu.learncenter.event.RefreshLeanTabEvent;
import com.dayu.learncenter.ui.activity.PubCourseActivity;
import com.dayu.livemodule.event.StartPushEvent;
import com.dayu.livemodule.event.UserKickOutEvent;
import com.dayu.utils.TabLayoutUtils;
import com.dayu.utils.UIUtils;
import com.umeng.analytics.MobclickAgent;
......@@ -182,13 +181,10 @@ public class HomeLearnFragment extends BaseFragment<SImplePresenter, FragmentHom
getTabData();
}
@Subscribe
public void kickOutUser(UserKickOutEvent event) {
showLoginDialog();
// UserManager.getInstance().clearUserInfo();
// AppManager.getInstance().finishAllActivity();
// ARouter.getInstance().build(BaseConstant.PATH_LOGIN).navigation();
}
// @Subscribe
// public void kickOutUser(UserKickOutEvent event) {
// showLoginDialog();
// }
@Subscribe
public void startPush(StartPushEvent event) {
......
......@@ -24,11 +24,13 @@ import com.dayu.livemodule.xiaozhibo.main.videolist.utils.TCVideoInfo;
import com.dayu.livemodule.xiaozhibo.main.videolist.utils.TCVideoListMgr;
import com.dayu.utils.CommonUtils;
import com.dayu.utils.GlideImageLoader;
import com.dayu.widgets.TextDialog;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class LiveListFragment extends BaseFragment<SImplePresenter, FragmentLiveListBinding> {
......@@ -178,8 +180,7 @@ public class LiveListFragment extends BaseFragment<SImplePresenter, FragmentLive
ImageView ivCover = helper.getView(R.id.iv_cover);
GlideImageLoader.load(mActivity, ivCover, item.getLiveStreamPic(), R.drawable.icon_video_default);
ivCover.setOnClickListener(v->{
VideoPlayActivity.launch(mActivity,item);
playBackVideo(item.getId());
toVideoPlay(item);
});
// MyJzvdStd jzVideo = helper.getView(R.id.jz_video);
......@@ -196,6 +197,29 @@ public class LiveListFragment extends BaseFragment<SImplePresenter, FragmentLive
}
}
private void toVideoPlay(LiveBackVideosBean item) {
if (!TextUtils.isEmpty(item.getVideoUrl())){
String[] urlArr = item.getVideoUrl().split(",");
if (urlArr.length>1){
List<String> urls = Arrays.asList(urlArr);
List<String> titles = new ArrayList<>();
for (int i=0;i<urls.size();i++){
titles.add(item.getTitle()+"_"+(i+1));
}
TextDialog.getInstance().showCenterDialog(mActivity,R.layout.dialog_live_back_text,
R.layout.item_dialog_live_back_text,titles, pos -> {
VideoPlayActivity.launch(mActivity,urls.get(pos),item.getLiveStreamPic());
playBackVideo(item.getId());
});
}else{
VideoPlayActivity.launch(mActivity,urlArr[0],item.getLiveStreamPic());
playBackVideo(item.getId());
}
}else{
showToast("播放地址无效");
}
}
//回放视频点赞
private void pointBackVideo(LiveBackVideosBean item) {
int type = item.getPointStatus() == 1 ? 2 : 1;
......
......@@ -63,7 +63,7 @@
android:background="@color/white"
android:gravity="top"
android:hint="@string/text_live_title_input"
android:maxLength="32"
android:maxLength="20"
android:maxLines="1"
android:paddingLeft="10dp"
android:paddingTop="10dp"
......
......@@ -49,6 +49,8 @@ dependencies {
// 美颜面板
implementation project(':beauty')
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.badoo.mobile:android-weak-handler:1.1'
......
......@@ -59,6 +59,16 @@ public class LiveUtils {
});
}
//验证用户是否有效
public static void checkUser(Context context) {
MLVBLiveRoom mLiveRoom = MLVBLiveRoom.sharedInstance(context);
TCUserMgr tcLoginMgr = TCUserMgr.getInstance();
if (mLiveRoom!= null){
mLiveRoom.setSelfProfile(tcLoginMgr.getNickname(), tcLoginMgr.getUserAvatar());
}
}
public static void initEnv(String enviroment) {
TCGlobalConfig.ENVIRONMENT = enviroment;
......
......@@ -2331,6 +2331,7 @@ public class MLVBLiveRoomImpl extends MLVBLiveRoom implements HttpRequests.Heart
TXLivePushConfig config = new TXLivePushConfig();
config.setFrontCamera(frontCamera);
config.enableScreenCaptureAutoRotate(mScreenAutoEnable);// 是否开启屏幕自适应
config.setTouchFocus(false);// 手动对焦
// config.setHomeOrientation(TXLiveConstants.VIDEO_ANGLE_HOME_RIGHT); //横屏推流
config.setPauseFlag(TXLiveConstants.PAUSE_FLAG_PAUSE_VIDEO | TXLiveConstants.PAUSE_FLAG_PAUSE_AUDIO);
mTXLivePusher.setConfig(config);
......@@ -2892,13 +2893,19 @@ public class MLVBLiveRoomImpl extends MLVBLiveRoom implements HttpRequests.Heart
inputStreamList.put(mainStream);
}
int subWidth = 160;
int subHeight = 240;
// int subWidth = 160;
// int subHeight = 240;
int offsetHeight = 90;
int subWidth = 288;
int subHeight = 432;
// int offsetHeight = 162;
if (mMainStreamWidth < 540 || mMainStreamHeight < 960) {
subWidth = 120;
subHeight = 180;
// subWidth = 120;
// subHeight = 180;
offsetHeight = 60;
subWidth = 216;
subHeight = 324;
// offsetHeight = 108;
}
int subLocationX = mMainStreamWidth - subWidth;
int subLocationY = mMainStreamHeight - subHeight - offsetHeight;
......
package com.dayu.livemodule.event;
//用户被顶替下线
//IM用户被顶替下线
public class UserKickOutEvent {
}
......@@ -5,6 +5,7 @@ import android.os.Handler;
import android.support.annotation.NonNull;
import android.util.Log;
import com.dayu.livemodule.event.UserKickOutEvent;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.google.gson.JsonSyntaxException;
......@@ -33,6 +34,8 @@ import com.tencent.imsdk.TIMValueCallBack;
import com.tencent.imsdk.ext.group.TIMGroupManagerExt;
import com.tencent.liteav.basic.log.TXCLog;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.FormatFlagsConversionMismatchException;
import java.util.HashMap;
......@@ -636,6 +639,9 @@ public class IMMessageMgr implements TIMMessageListener {
@Override
public void onError(int code, String desc) {
Log.e(TAG, "modifySelfProfile failed: " + code + " desc" + desc);
if (code == 6014){
EventBus.getDefault().post(new UserKickOutEvent());
}
}
@Override
......
......@@ -20,10 +20,10 @@ public class TCGlobalConfig {
// public static String pushURLPrefix = "rtmp://push.dev.kf.ai"; //dev
// public static String ENVIRONMENT = "debug"; //dev
public static String pushURLPrefix = "rtmp://push.uat.kf.ai"; //uat
public static String ENVIRONMENT = "uat"; //dev
// public static String pushURLPrefix = "rtmp://push.kf.ai"; //release
// public static String ENVIRONMENT = "release"; //release
// public static String pushURLPrefix = "rtmp://push.uat.kf.ai"; //uat
// public static String ENVIRONMENT = "uat"; //dev
public static String pushURLPrefix = "rtmp://push.kf.ai"; //release
public static String ENVIRONMENT = "release"; //release
public static final String LIVE_ENVIRONMENT = "environment";
......
......@@ -46,47 +46,47 @@ import java.util.Locale;
* <p>
* Function: 主播推流的页面
* <p>
*
* <p>
* 1. MLVB 其他观众发起连麦请求处理:{@link TCCameraAnchorActivity#onRequestJoinAnchor(AnchorInfo, String)}
*
* <p>
* 2. MLVB 其他主播连麦,结束连麦处理:{@link TCCameraAnchorActivity#onAnchorEnter(AnchorInfo)} {@link TCCameraAnchorActivity#onAnchorExit(AnchorInfo)}
*
* <p>
* 3. 音效控制面板类 {@link TCAudioControl}
*
* <p>
* 4. 美颜特效控制类 {@link BeautyPanel}
*/
public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
private static final String TAG = TCCameraAnchorActivity.class.getSimpleName();
private TXCloudVideoView mTXCloudVideoView; // 主播本地预览的 View
private Button mFlashView; // 闪光灯按钮
private TXCloudVideoView mTXCloudVideoView; // 主播本地预览的 View
private Button mFlashView; // 闪光灯按钮
// 观众头像列表控件
private RecyclerView mUserAvatarList; // 用户头像的列表控件
private RecyclerView mUserAvatarList; // 用户头像的列表控件
private TCUserAvatarListAdapter mAvatarListAdapter; // 头像列表的 Adapter
// 主播信息
private ImageView mHeadIcon; // 主播头像
private ImageView mRecordBall; // 表明正在录制的红点球
private TextView mBroadcastTime; // 已经开播的时间
private TextView mMemberCount; // 观众数量
private ImageView mHeadIcon; // 主播头像
private ImageView mRecordBall; // 表明正在录制的红点球
private TextView mBroadcastTime; // 已经开播的时间
private TextView mMemberCount; // 观众数量
private TCAudioControl mAudioCtrl; // 音效控制面板
private LinearLayout mAudioPluginLayout;
private LinearLayout mAudioPluginLayout;
private BeautyPanel mBeautyControl; // 美颜设置的控制类
// log相关
private boolean mShowLog; // 是否打开 log 面板
private boolean mFlashOn; // 是否打开闪光灯
private boolean mShowLog; // 是否打开 log 面板
private boolean mFlashOn; // 是否打开闪光灯
// 连麦主播
private boolean mPendingRequest; // 主播是否正在处理请求
private boolean mPendingRequest; // 主播是否正在处理请求
private TCVideoViewMgr mPlayerVideoViewList; // 主播视频列表的View
private List<AnchorInfo> mPusherList; // 当前在麦上的主播
private List<AnchorInfo> mPusherList; // 当前在麦上的主播
private ObjectAnimator mObjAnim; // 动画
private ObjectAnimator mObjAnim; // 动画
@Override
......@@ -139,6 +139,7 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
for (AnchorInfo item : mPusherList) {
if (userID.equalsIgnoreCase(item.userID)) {
onAnchorExit(item);
// changePushView(item);
break;
}
}
......@@ -148,6 +149,29 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
});
}
private void changePushView(AnchorInfo item) {
final TCVideoView videoView = mPlayerVideoViewList.applyVideoView(item.userID);
if (videoView == null) {
return;
}
mLiveRoom.startLocalPreview(true, videoView.videoView);
mLiveRoom.startRemoteView(item, mTXCloudVideoView, new IMLVBLiveRoomListener.PlayCallback() {
@Override
public void onBegin() {
}
@Override
public void onError(int errCode, String errInfo) {
}
@Override
public void onEvent(int event, Bundle param) {
}
}); //开启远端视频渲染
}
/**
* 加载主播头像
......@@ -206,12 +230,57 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
@Override
protected void stopPublish() {
//踢出连麦人
// if (mPusherList != null && mPusherList.size() > 0) {
// for (AnchorInfo user : mPusherList){
// mLiveRoom.kickoutJoinAnchor(user.userID);
// onAnchorExit(user);
// }
// }
super.stopPublish();
if (mAudioCtrl != null) {
mAudioCtrl.unInit();
mAudioCtrl.setPusher(null);
mAudioCtrl = null;
}
}
/**
* 取消连麦弹框
*
*/
public void showExitAnchorDialog(String msg) {
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.ConfirmDialogStyle);
builder.setCancelable(true);
builder.setTitle(msg);
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
stopAnchor();
}
});
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
AlertDialog alertDialog = builder.create();
alertDialog.show();
alertDialog.setCanceledOnTouchOutside(false);
}
private void stopAnchor() {
//踢出连麦人
if (mPusherList != null && mPusherList.size() > 0) {
for (AnchorInfo user : mPusherList){
mLiveRoom.kickoutJoinAnchor(user.userID);
onAnchorExit(user);
}
}
}
@Override
......@@ -323,7 +392,7 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
return;
}
if (mPusherList.size() >= 3) {
if (mPusherList.size() >= 1) {
mLiveRoom.responseJoinAnchor(pusherInfo.userID, false, "主播端连麦人数超过最大限制");
return;
}
......@@ -359,6 +428,9 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
if (null != mAudioCtrl && mAudioCtrl.getVisibility() != View.GONE && ev.getRawY() < mAudioCtrl.getTop()) {
mAudioCtrl.setVisibility(View.GONE);
}
if (null != mBeautyControl && mBeautyControl.getVisibility() != View.GONE && ev.getRawY() < mBeautyControl.getTop()) {
mBeautyControl.setVisibility(View.GONE);
}
return super.dispatchTouchEvent(ev);
}
......@@ -449,7 +521,11 @@ public class TCCameraAnchorActivity extends TCBaseAnchorActivity {
}
} else if (i == R.id.btn_close) {
showExitInfoDialog("当前正在直播,是否退出直播?", false);
if (mPusherList != null && mPusherList.size() > 0) {
showExitAnchorDialog("当前正在连麦,是否结束连麦?");
}else {
showExitInfoDialog("当前正在直播,是否退出直播?", false);
}
} else if (i == R.id.btn_audio_ctrl) {
if (null != mAudioCtrl) {
......
......@@ -656,7 +656,7 @@ public class TCAudienceActivity extends Activity implements IMLVBLiveRoomListene
@Override
public void onKickoutJoinAnchor() {
Toast.makeText(getApplicationContext(), "不好意思,您被主播踢开",Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(), "不好意思,主播已断开连麦",Toast.LENGTH_LONG).show();
stopLinkMic();
}
......
......@@ -2,16 +2,16 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/audience_play_root"
tools:ignore="contentDescription"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
tools:ignore="contentDescription">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/anchor_video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:visibility="gone"/>
android:visibility="gone" />
<ImageView
android:id="@+id/audience_background"
......@@ -20,140 +20,154 @@
<!--连麦:播放小窗口定义 开始-->
<!--连麦:第一个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="100dp"
android:layout_height="150dp"
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="56dp"
android:layout_marginRight="8dp">
android:layout_alignParentRight="true">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</com.tencent.rtmp.ui.TXCloudVideoView>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/loading_background1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview1"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out1"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"/>
<!--连麦:第二个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout2"
android:layout_width="100dp"
android:layout_height="150dp"
android:layout_above="@+id/frameLayout1"
android:layout_alignRight="@+id/frameLayout1">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</com.tencent.rtmp.ui.TXCloudVideoView>
<!--连麦:第一个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="180dp"
android:layout_height="270dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="8dp"
>
<FrameLayout
android:id="@+id/loading_background2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:visibility="gone">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"></com.tencent.rtmp.ui.TXCloudVideoView>
<ImageView
android:id="@+id/loading_imageview2"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out2"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"/>
<!--连麦:第三个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout3"
android:layout_width="100dp"
android:layout_height="150dp"
android:layout_above="@+id/frameLayout2"
android:layout_alignRight="@+id/frameLayout2">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</com.tencent.rtmp.ui.TXCloudVideoView>
<FrameLayout
android:id="@+id/loading_background1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/black"
android:visibility="gone">
<FrameLayout
android:id="@+id/loading_background3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview1"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out1"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<!--连麦:第二个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout2"
android:layout_width="180dp"
android:layout_height="270dp"
android:layout_above="@+id/frameLayout1"
android:layout_alignRight="@+id/frameLayout1">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"></com.tencent.rtmp.ui.TXCloudVideoView>
<ImageView
android:id="@+id/loading_imageview3"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out3"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"/>
<FrameLayout
android:id="@+id/loading_background2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/black"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview2"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out2"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<!--连麦:第三个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout3"
android:layout_width="180dp"
android:layout_height="270dp"
android:layout_above="@+id/frameLayout2"
android:layout_alignRight="@+id/frameLayout2">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"></com.tencent.rtmp.ui.TXCloudVideoView>
<FrameLayout
android:id="@+id/loading_background3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/black"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview3"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out3"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
</RelativeLayout>
</ScrollView>
<!--连麦:播放小窗口定义 结束-->
<RelativeLayout
android:id="@+id/anchor_rl_controllLayer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include android:id="@+id/layout_live_pusher_info"
<include
android:id="@+id/layout_live_pusher_info"
layout="@layout/layout_live_pusher_info"
android:layout_margin="5dp"
android:layout_width="110dp"
android:layout_height="35dp"/>
android:layout_height="35dp"
android:layout_margin="5dp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/anchor_rv_avatar"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/layout_live_pusher_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"/>
android:layout_marginTop="5dp"
android:layout_marginRight="15dp"
android:layout_toRightOf="@+id/layout_live_pusher_info"
android:visibility="gone" />
<RelativeLayout
android:id="@+id/tool_bar"
......@@ -180,6 +194,7 @@
android:background="@drawable/icon_message"
android:onClick="onClick" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -225,10 +240,10 @@
</FrameLayout>
<FrameLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
android:layout_weight="1"
android:visibility="gone">
<ImageView
android:id="@+id/btn_log"
......@@ -276,35 +291,35 @@
android:id="@+id/im_msg_listview"
android:layout_width="250dp"
android:layout_height="10dp"
android:layout_marginLeft="15dp"
android:scrollbars="none"
android:layout_alignParentLeft="true"
android:layout_above="@id/tool_bar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:cacheColorHint="#00000000"
android:divider="#3c421b1b"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="none"
android:stackFromBottom="true"
android:transcriptMode="normal"
android:visibility="gone"/>
android:visibility="gone" />
<!--录制-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_alignParentBottom="true"
android:visibility="gone"
>
android:layout_marginBottom="10dp"
android:visibility="gone">
<ProgressBar
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:progressDrawable="@drawable/record_progress"
android:max="100"
android:progress="0" />
android:progress="0"
android:progressDrawable="@drawable/record_progress" />
<LinearLayout
android:layout_width="match_parent"
......@@ -333,30 +348,29 @@
android:id="@+id/close_record"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:layout_marginLeft="50dp"
android:layout_centerVertical="true"
android:layout_marginLeft="50dp"
android:background="@drawable/btn_close"
android:onClick="onClick"
/>
android:onClick="onClick" />
<ImageView
android:id="@+id/record"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="30dp"
android:background="@drawable/start_record"
android:layout_centerInParent="true"
android:onClick="onClick"
/>
android:onClick="onClick" />
<ImageView
android:id="@+id/retry_record"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="50dp"
android:background="@drawable/again"
android:onClick="onClick"
/>
android:onClick="onClick" />
</RelativeLayout>
......@@ -371,8 +385,8 @@
android:id="@+id/heart_layout"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:focusable="true" />
</RelativeLayout>
......@@ -381,7 +395,7 @@
android:id="@+id/anchor_danmaku_view"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_centerInParent="true"/>
android:layout_centerInParent="true" />
</RelativeLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rl_root"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -10,143 +9,153 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:visibility="gone"/>
android:visibility="gone" />
<!--连麦:播放小窗口定义 开始-->
<!--连麦:第一个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="100dp"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="56dp"
android:layout_marginRight="8dp">
>
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</com.tencent.rtmp.ui.TXCloudVideoView>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--连麦:第一个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="180dp"
android:layout_height="270dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="8dp"
>
<FrameLayout
android:id="@+id/loading_background1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:visibility="gone">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"></com.tencent.rtmp.ui.TXCloudVideoView>
<ImageView
android:id="@+id/loading_imageview1"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out1"
android:layout_alignTop="@id/frameLayout1"
android:layout_alignRight="@id/frameLayout1"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_kick_out"
android:layout_gravity="top|right"
android:visibility="invisible"
android:onClick="onClick"/>
<!--连麦:第二个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout2"
android:layout_width="100dp"
android:layout_height="150dp"
android:layout_above="@+id/frameLayout1"
android:layout_alignRight="@+id/frameLayout1">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</com.tencent.rtmp.ui.TXCloudVideoView>
<FrameLayout
android:id="@+id/loading_background1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/black"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview1"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/loading_background2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:visibility="gone">
<Button
android:id="@+id/btn_kick_out1"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_alignTop="@id/frameLayout1"
android:layout_alignRight="@id/frameLayout1"
android:layout_gravity="top|right"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_kick_out"
android:onClick="onClick"
android:visibility="invisible" />
<!--连麦:第二个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout2"
android:layout_width="180dp"
android:layout_height="270dp"
android:layout_above="@+id/frameLayout1"
android:layout_alignRight="@+id/frameLayout1">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"></com.tencent.rtmp.ui.TXCloudVideoView>
<ImageView
android:id="@+id/loading_imageview2"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out2"
android:layout_alignTop="@id/frameLayout2"
android:layout_alignRight="@id/frameLayout2"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_kick_out"
android:layout_gravity="top|right"
android:visibility="invisible"
android:onClick="onClick"/>
<!--连麦:第三个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout3"
android:layout_width="100dp"
android:layout_height="150dp"
android:layout_above="@+id/frameLayout2"
android:layout_alignRight="@+id/frameLayout2">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
</com.tencent.rtmp.ui.TXCloudVideoView>
<FrameLayout
android:id="@+id/loading_background2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/black"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview2"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/loading_background3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:visibility="gone">
<Button
android:id="@+id/btn_kick_out2"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_alignTop="@id/frameLayout2"
android:layout_alignRight="@id/frameLayout2"
android:layout_gravity="top|right"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_kick_out"
android:onClick="onClick"
android:visibility="invisible" />
<!--连麦:第三个播放小窗口-->
<FrameLayout
android:id="@+id/frameLayout3"
android:layout_width="180dp"
android:layout_height="270dp"
android:layout_above="@+id/frameLayout2"
android:layout_alignRight="@+id/frameLayout2">
<com.tencent.rtmp.ui.TXCloudVideoView
android:id="@+id/video_player3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"></com.tencent.rtmp.ui.TXCloudVideoView>
<ImageView
android:id="@+id/loading_imageview3"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out3"
android:layout_alignTop="@id/frameLayout3"
android:layout_alignRight="@id/frameLayout3"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_kick_out"
android:layout_gravity="top|right"
android:visibility="invisible"
android:onClick="onClick"/>
<FrameLayout
android:id="@+id/loading_background3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="@color/black"
android:visibility="gone">
<ImageView
android:id="@+id/loading_imageview3"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<Button
android:id="@+id/btn_kick_out3"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_alignTop="@id/frameLayout3"
android:layout_alignRight="@id/frameLayout3"
android:layout_gravity="top|right"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/btn_kick_out"
android:onClick="onClick"
android:visibility="invisible" />
</RelativeLayout>
</ScrollView>
<!--连麦:播放小窗口定义 结束-->
......@@ -155,219 +164,225 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<include android:id="@+id/layout_live_pusher_info"
<include
android:id="@+id/layout_live_pusher_info"
layout="@layout/layout_live_pusher_info"
android:layout_margin="5dp"
android:layout_width="110dp"
android:layout_height="35dp"/>
android:layout_height="35dp"
android:layout_margin="5dp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/anchor_rv_avatar"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/layout_live_pusher_info"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginRight="15dp"
android:layout_toRightOf="@+id/layout_live_pusher_info" />
<LinearLayout
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_alignParentBottom="true">
android:layout_alignParentBottom="true"
android:layout_margin="15dp">
<Button
android:id="@+id/btn_message_input"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:background="@drawable/icon_message"
android:onClick="onClick"/>
android:onClick="onClick" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1" />
<Button
android:id="@+id/anchor_btn_flash"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:background="@drawable/icon_flash"
android:onClick="onClick"/>
android:onClick="onClick" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1" />
<Button
android:id="@+id/switch_cam"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:background="@drawable/icon_switch_camera_on"
android:onClick="onClick"/>
android:onClick="onClick" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1" />
<Button
android:id="@+id/beauty_btn"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:background="@drawable/icon_beauty_drawable"
android:onClick="onClick"/>
android:onClick="onClick" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1" />
<Button
android:id="@+id/btn_audio_ctrl"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:background="@drawable/music_big"
android:onClick="onClick"/>
android:onClick="onClick" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1" />
<Button
android:id="@+id/btn_close"
android:layout_width="@dimen/live_btn_size"
android:layout_height="@dimen/live_btn_size"
android:background="@drawable/btn_close"
android:onClick="onClick"/>
android:onClick="onClick" />
</LinearLayout>
<LinearLayout
android:id="@+id/anchor_ll_audio_plugin"
android:layout_width="200dp"
android:layout_height="50dp"
android:orientation="horizontal"
android:weightSum="10"
android:id="@+id/anchor_ll_audio_plugin"
android:visibility="gone"
>
android:weightSum="10">
<Button
android:id="@+id/btn_audio_effect"
android:layout_width="0dp"
android:layout_weight="5"
android:layout_height="match_parent"
android:layout_weight="5"
android:background="@drawable/shape_round_button"
android:onClick="onClick"
android:text="音效"
android:textSize="20dp"
android:textColor="#FFFFFF"
android:id="@+id/btn_audio_effect"
android:onClick="onClick"
android:background="@drawable/shape_round_button"/>
android:textSize="20dp" />
<Button
android:id="@+id/btn_audio_close"
android:layout_width="0dp"
android:layout_weight="5"
android:layout_height="match_parent"
android:layout_weight="5"
android:background="@drawable/shape_round_button"
android:onClick="onClick"
android:text="结束"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:id="@+id/btn_audio_close"
android:onClick="onClick"
android:background="@drawable/shape_round_button"/>
android:textSize="20dp" />
</LinearLayout>
<ListView
android:id="@+id/im_msg_listview"
android:layout_width="250dp"
android:layout_height="10dp"
android:scrollbars="none"
android:layout_marginLeft="15dp"
android:layout_alignParentLeft="true"
android:layout_above="@id/tool_bar"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:cacheColorHint="#00000000"
android:divider="#3c421b1b"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="none"
android:stackFromBottom="true"
android:transcriptMode="normal" />
<com.dayu.livemodule.xiaozhibo.anchor.music.TCAudioControl
android:id="@+id/anchor_audio_control"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#ffffff"
android:clickable="true"
android:padding="0dp"
android:orientation="vertical"
android:visibility="gone"
android:background="#ffffff"
android:layout_alignParentBottom="true"
android:id="@+id/anchor_audio_control"/>
android:padding="0dp"
android:visibility="gone" />
<com.tencent.liteav.demo.beauty.BeautyPanel
android:id="@+id/beauty_panel"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/tool_bar" />
android:layout_above="@id/tool_bar"
android:visibility="gone" />
<LinearLayout
android:id="@+id/layoutFaceBeauty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:minHeight="105dp"
android:orientation="vertical"
android:visibility="gone"
android:layout_alignParentBottom="true"
android:id="@+id/layoutFaceBeauty"
android:layout_gravity="bottom"
android:layout_marginBottom="0dp"
android:background="@color/white"
android:clickable="true"
android:layout_gravity="bottom">
android:minHeight="105dp"
android:orientation="vertical"
android:padding="15dp"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginBottom="30dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/activity_publish_beauty"
android:textSize="16sp" />
<SeekBar
android:id="@+id/beauty_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:thumb="@drawable/beauty_seekbar_icon"
android:progressDrawable="@drawable/beauty_seekbar_progress"
android:paddingLeft="15dp"
android:paddingRight="18dp"
android:indeterminate="false"
android:maxHeight="1.0dip"
android:minHeight="1.0dip"
android:visibility="visible"
android:indeterminate="false" />
android:paddingLeft="15dp"
android:paddingRight="18dp"
android:progressDrawable="@drawable/beauty_seekbar_progress"
android:thumb="@drawable/beauty_seekbar_icon"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center_vertical"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/activity_publish_white"
android:textSize="16sp" />
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:thumb="@drawable/beauty_seekbar_icon"
android:progressDrawable="@drawable/beauty_seekbar_progress"
android:paddingLeft="15dp"
android:paddingRight="18dp"
android:indeterminate="false"
android:maxHeight="1.0dip"
android:minHeight="1.0dip"
android:visibility="visible"
android:indeterminate="false" />
android:paddingLeft="15dp"
android:paddingRight="18dp"
android:progressDrawable="@drawable/beauty_seekbar_progress"
android:thumb="@drawable/beauty_seekbar_icon"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
......@@ -382,10 +397,10 @@
android:id="@+id/heart_layout"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:focusable="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
android:focusable="true" />
</RelativeLayout>
<!--点赞动画-->
......@@ -395,7 +410,7 @@
android:id="@+id/anchor_danmaku_view"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_centerInParent="true"/>
android:layout_centerInParent="true" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -30,6 +30,11 @@
android:text="@string/live_time_tips"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- 观看人数 -->
<TextView
android:id="@+id/tv_members"
......@@ -63,6 +68,7 @@
android:text="@string/live_admires_tips"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:id="@+id/anchor_btn_cancel"
android:layout_marginTop="50dp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment