Enable Picture-in-Picture
controller.pip drives the Picture-in-Picture (PiP) window on both platforms over the SDK’s own platform channel, so PiP never routes through the engine’s fullscreen path.
PiP survives a playlist advance, and captions scale to the window rather than rendering at full-player size inside it. Supply the window’s content with pipBuilder on FastPixPlayer or FastPixVideoSurface. Without one, the SDK uses the built-in fastPixDefaultPipLayout.
Platform setup
Android
Mark the activity as PiP capable and let it handle the configuration changes itself, in android/app/src/main/AndroidManifest.xml:
iOS
PiP keeps playing while the app is in the background, which needs the audio background mode in ios/Runner/Info.plist:
What’s next
- Control video playback for play, pause, seek, and volume.
- Manage a playlist to keep PiP playing across items.