Live Audio Room
Minimize and PiP
Minimize a voice room to a floating overlay or Android Picture-in-Picture.
A user can minimize a room to a floating overlay and keep listening while they use the rest of your app. On Android 12 and later (API 31), the room can also go to the system's Picture-in-Picture window.
Set it up
Wrap your app with VoxeraMiniPopScope, and mount VoxeraMiniOverlayPage at the root. Then configure minimize in onControllerReady:
VoxeraAudioRoom(
appId: appId,
appKey: appKey,
userId: userId,
userName: userName,
roomId: roomId,
roomOwnerId: roomOwnerId,
onControllerReady: (controller) {
controller.navigatorKey = navKey; // for default dialogs
controller.minimize.configure(
VoxeraMinimizeConfig(
enableOSPip: true,
onClose: () => myExitRoom(),
),
);
},
);To reopen a minimized room, pass the same controller back to VoxeraAudioRoom through its controller parameter.
Set enableMinimize: false in VoxeraAudioRoomConfig to hide the minimize button.
Platform setup
- Android: set
minSdkVersionto at least 31 for Picture-in-Picture. - iOS: enable Background Modes > Audio, AirPlay, and Picture in Picture in Xcode.