fl_pip
4.0.0, released 3 weeks ago by an unverified publisher
Display Flutter engines and videos in native picture-in-picture or overlay windows.
WASM-ready
What it does
A Flutter plugin that displays Flutter pages and video playback inside native picture-in-picture (PiP) or floating overlay windows across Android, iOS, and HarmonyOS. It manages multi-engine communication and supports customized video controls and positioning.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need picture-in-picture mode for Flutter pages or video playback on Android, iOS, or HarmonyOS.
- You want to display floating overlay windows or manage multi-engine applications.
Skip it when
- You are developing for web or desktop platforms.
- You do not want to configure native platform setup like Activities, Capabilities, or custom surfaces.
Strengths
- Supports multiple platforms including Android, iOS, and HarmonyOS.
- Integrated support for both system picture-in-picture and floating overlay windows.
- Provides message passing and synchronization between the main engine and the PiP engine.
Weaknesses
- Requires significant native configuration for each platform (e.g., overriding MainActivity, background modes, surfaces).
- iOS main engine requires placeholder media generation since it lacks an independent FlutterEngine instance.
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 1
Requires modifying Android's MainActivity to extend FlPiPActivity and updating AndroidManifest.xml, adding Background Modes for PiP on iOS, and registering surfaces and abilities for HarmonyOS.
final FlMultiEngineInfo engine = await FlPiP.instance.present(
name: 'pipMain',
android: const FlPiPAndroidOptions.overlay(),
ios: const FlPiPIOSOptions(),
harmonyOS: const FlPiPHarmonyOSOptions.systemPip(),
);