修改语音连麦的逻辑
This commit is contained in:
@@ -198,7 +198,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
// ImgLoader.displayBlurLive(mContext, coverUrl, mCover, 400, 600);
|
||||
//
|
||||
// }
|
||||
}
|
||||
}//
|
||||
|
||||
@Override
|
||||
public synchronized void setLiveBeanLandscape(int landscape) {
|
||||
@@ -206,7 +206,10 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
Log.i(TAG, "setLiveBeanLandscape: " + landscape + " isPk: " + isPk);
|
||||
this.landscape = landscape;
|
||||
this.videoLandscape = landscape;
|
||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||
if (mPlayer != null) {
|
||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||
}
|
||||
|
||||
if (landscape == 2) {
|
||||
Log.i(TAG, "还原9:16");
|
||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
|
||||
@@ -1111,19 +1114,19 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
int maxRate = 900;
|
||||
switch (IMLoginManager.get(mContext).getSelectClarity()) {
|
||||
case 0:
|
||||
rcrtcVideoResolution = RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_480_848;
|
||||
minRate = 200;
|
||||
maxRate = 900;
|
||||
rcrtcVideoResolution = landscape == 1 ? RCRTCParamsType.RCRTCVideoResolution.parseVideoResolution(960, 720) : RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_480_848;
|
||||
minRate = landscape == 1 ? 900 : 200;
|
||||
maxRate = landscape == 1 ? 700 : 900;
|
||||
break;
|
||||
case 1:
|
||||
rcrtcVideoResolution = RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_720_1280;
|
||||
minRate = 250;
|
||||
maxRate = 2200;
|
||||
rcrtcVideoResolution = landscape == 1 ? RCRTCParamsType.RCRTCVideoResolution.parseVideoResolution(960, 720) : RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_720_1280;
|
||||
minRate = landscape == 1 ? 900 : 250;
|
||||
maxRate = landscape == 1 ? 700 : 2200;
|
||||
break;
|
||||
case 2:
|
||||
rcrtcVideoResolution = RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_1080_1920;
|
||||
minRate = 400;
|
||||
maxRate = 4000;
|
||||
rcrtcVideoResolution = landscape == 1 ? RCRTCParamsType.RCRTCVideoResolution.parseVideoResolution(960, 720) : RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_1080_1920;
|
||||
minRate = landscape == 1 ? 900 : 400;
|
||||
maxRate = landscape == 1 ? 700 : 4000;
|
||||
break;
|
||||
}
|
||||
// 示例代码使用480x640分辨率演示
|
||||
@@ -1146,6 +1149,15 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
ArrayList<RCRTCOutputStream> streams = new ArrayList<>();
|
||||
// streams.add(RCRTCEngine.getInstance().getDefaultVideoStream());
|
||||
streams.add(RCRTCEngine.getInstance().getDefaultAudioStream());
|
||||
if (landscape == 1) {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setLiveBeanLandscape(1);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
// 开启摄像头
|
||||
// RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(null);
|
||||
// 开始切换为主播身份
|
||||
|
||||
@@ -419,17 +419,6 @@
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quick_gift_remaining_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="-2dp"
|
||||
android:text="99"
|
||||
android:textColor="#FFB403"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/combo"
|
||||
@@ -505,7 +494,18 @@
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quick_gift_remaining_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="150dp"
|
||||
android:layout_marginBottom="-2dp"
|
||||
android:text="99"
|
||||
android:textColor="#FFB403"
|
||||
android:textSize="8sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user