logo
On this page

How to pause/resume receiving streams in a room?

2024-05-11
Products / Plugins:Live Streaming Kit
Platform / Framework:Android

live streaming UIKit (Live Streaming Kit) allows you to pause/resume receiving streams in a room. This operation does not affect other users and only takes effect locally.

Taking "pause receiving streams in the room when the application goes to the background, and resume when returning to the foreground" as an example, the sample code is as follows:

//Activity that added ZegoUIKitPrebuiltLiveStreamingFragment.
public class LiveActivity extends AppCompatActivity {
    ...
     @Override
    protected void onStart() {
        super.onStart();
        ZegoLiveStreamingManager.getInstance().unMuteAllAudioVideo();
    }

    @Override
    protected void onStop() {
        super.onStop();
        ZegoLiveStreamingManager.getInstance().muteAllAudioVideo();
    }

Previous

How to handle the case where the certificate is obtained but the beauty effect is not effective?

Next

When using ZegoEffects in the custom preprocessing feature of RTC, the preview and published stream show a black screen. How to handle this?