full-apartment-20972
11/12/2025, 8:41 AMtall-airline-16756
11/12/2025, 8:41 AMtall-airline-16756
11/12/2025, 8:41 AMInfo.plist by adding the UIBackgroundModes key with the value audio.
• You'll also want to set the AVAudioSession category to .playback or .moviePlayback so audio keeps playing in the background.
• Finally, use AVPictureInPictureController to manage the PiP functionality smoothly.
For Android:
• Make sure your AndroidManifest.xml declares the necessary camera and audio permissions.
• PiP usually triggers automatically when the app is minimized during video playback, but if you want more control, you can use PictureInPictureParams through platform channels.
Since Flutter doesn’t have a built-in PiP API, integrating native iOS and Android PiP features via platform channels is the way to go. If you’d like, I’m here to help with more details or examples to make this easier for you. Just let me know!
Sources: Camera & microphone | LiveKit docs | minimal-pip/minimal-pip/RoomView.swift | ios/RCTWebRTC/PIPController.h | README.md | Flutter quickstart | LiveKit docsfull-apartment-20972
11/12/2025, 8:43 AMfull-apartment-20972
11/12/2025, 8:43 AMtall-airline-16756
11/12/2025, 8:43 AMMethodChannel class in Flutter to send and receive messages between Dart and the native side.
2. Implement Native Code for iOS:
• In your iOS project, you’ll work with AVPictureInPictureController to manage PiP functionality.
• Make sure you’ve enabled background modes and configured Info.plist as needed.
• Write Swift or Objective-C code to handle PiP activation and communicate with Flutter using the platform channel.
3. Implement Native Code for Android:
• For Android, use PictureInPictureParams to manage PiP features.
• Don’t forget to declare the necessary permissions in your AndroidManifest.xml.
• Write Java or Kotlin code to activate PiP and connect with Flutter through the platform channel.
4. Trigger PiP from Flutter:
• Finally, use the platform channel to call your native PiP implementation whenever you want, like when a user taps a button or minimizes the app.
If you’d like, I’m here to help with specific code examples or any part of setting up platform channels or PiP on iOS or Android. Just let me know, and we’ll work through it together!