完成了多房间直播

This commit is contained in:
董宏宇
2021-03-03 17:04:13 +08:00
parent 48f5813b5c
commit 20b9609cf3
3 changed files with 7 additions and 7 deletions

View File

@@ -58,13 +58,13 @@ public abstract class BaseLiveActivity extends AppCompatActivity {
surfacePreviewView = findViewById(R.id.surfacePreviewView);
btnLive = findViewById(R.id.btnLive);
btnLive.setOnCheckedChangeListener((buttonView, isChecked) -> {
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
// Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
toggleLive(isChecked);
});
btnSaveFile = findViewById(R.id.btnSaveFile);
btnSaveFile.setOnCheckedChangeListener((btnSaveFile, isChecked) -> {
Toast.makeText(getApplicationContext(), btnSaveFile.getText(), Toast.LENGTH_SHORT).show();
// Toast.makeText(getApplicationContext(), btnSaveFile.getText(), Toast.LENGTH_SHORT).show();
YuvToolUtils.isSaveFile = isChecked;
if (isChecked) {
YuvToolUtils.connectYUVFile(yuvSavePath);
@@ -73,7 +73,7 @@ public abstract class BaseLiveActivity extends AppCompatActivity {
btnChangeCameraState = findViewById(R.id.btnChangeCameraState);
btnChangeCameraState.setOnCheckedChangeListener((btnSaveFile, isChecked) -> {
Toast.makeText(getApplicationContext(), btnSaveFile.getText(), Toast.LENGTH_SHORT).show();
// Toast.makeText(getApplicationContext(), btnSaveFile.getText(), Toast.LENGTH_SHORT).show();
toggleCameraState(isChecked);
});
@@ -83,14 +83,14 @@ public abstract class BaseLiveActivity extends AppCompatActivity {
etLookRoomId = findViewById(R.id.etLookRoomId);
liveToggleBtn = findViewById(R.id.liveToggleBtn);
liveToggleBtn.setOnCheckedChangeListener((buttonView, isChecked) -> {
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
// Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
togglePlay(isChecked);
});
tbLoginMultiRoom = findViewById(R.id.tbLoginMultiRoom);
tbLoginMultiRoom.setOnCheckedChangeListener((buttonView, isChecked) -> {
Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
// Toast.makeText(getApplicationContext(), buttonView.getText(), Toast.LENGTH_SHORT).show();
toggleLoginMultiRoom(isChecked);
});
tvWifiState = findViewById(R.id.tvWifiState);

View File

@@ -104,7 +104,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="请输入要查看的车机SN"
android:text="F803EB2046PZD00149"
android:text="F803BB2037EZD00048"
android:textColor="#FFFF"
app:layout_constraintBottom_toTopOf="@+id/liveToggleBtn"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -461,7 +461,7 @@ public class MoGoLiveManager {
return;
}
if (!TextUtils.isEmpty(multiRoomId)) {
mExpressEngine.loginMultiRoom(multiRoomId, zeGoMultiRoomConfig);
mExpressEngine.logoutRoom(multiRoomId);
}
}