完善直播demo

This commit is contained in:
董宏宇
2021-02-05 12:38:52 +08:00
parent c704107c90
commit 5a4293b950
4 changed files with 33 additions and 21 deletions

View File

@@ -40,11 +40,11 @@ public class LivePushActivity extends BaseLiveActivity {
public void toggleLive(boolean isLive) {
Log.i(TAG, "toggleLive : " + isLive);
this.isLive = isLive;
// if (isLive) {
// PushService.startService(this, PushService.ACTION_START_RTMP_PUSH, Devices.getSn());
// } else {
// PushService.startService(this, PushService.ACTION_STOP_RTMP_PUSH, null);
// }
if (isLive) {
PushService.startService(this, PushService.ACTION_START_RTMP_PUSH, Devices.getSn());
} else {
PushService.startService(this, PushService.ACTION_STOP_RTMP_PUSH, null);
}
}
@Override