Minimize audio room window
With only two simple steps, you can achieve the effect of minimizing the audio room window within the application. Ideally, the final effect will look like this:
Integrate the minimize function into the app
To display the minimize button, configure the ZegoUIKitPrebuiltLiveAudioRoomConfig
's topMenuBar
, and add the ZegoLiveAudioRoomMenuBarButtonName.minimizingButton
button to the top menu bar.
To achieve the effect of minimizing the window, you need to use the ZegoUIKitPrebuiltLiveAudioRoomMiniOverlayPage
component and insert it into the Overlay
of the app.
When you minimize the interface, if the button is not restricted, clicking the enter button again will enter the live audio room again. To avoid this situation, it is necessary to restrict the button.
Therefore, in the click event of the button, you need to handle it: if it is currently in a minimized state, do not carry out the page jump operation.
After completing the above two steps, you can now minimize the audio room window within the application.