Skip to content

[ios][video_player] pip - picture in picture #60048

@p30arena

Description

@p30arena

Use case

I have a customer asking for PIP when the app is playing a video and the user wants multi-tasking.

For Android I had to edit the plugin, and use this line of code:
getActivity().enterPictureInPictureMode();
https://developer.android.com/guide/topics/ui/picture-in-picture#java

But for iOS, it is a different story, iOS does not support PIP in UIWindow or UIView, it is supported only in a Custom Player.
We need a custom view for that.
https://developer.apple.com/documentation/avkit/adopting_picture_in_picture_in_a_custom_player
https://developer.apple.com/documentation/avfoundation/avplayerlayer

The video_player plugin is using Texture to show the video output.

Proposal

I need a way to customize the UIView created by the engine for the texture and add AVPlayerLayer support to it.
Any suggestions on how can I contribute this feature to the plugin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: layoutSystemChrome and Framework's Layout Issuesc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterhas partial patchThere is a PR awaiting someone to take it across the finish linep: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions