Skip to content

vout: apple: Add Picture in Picture

This adds a new module to handle picture in picture on iOS and tvOS.

Picture in picture is only enabled if the drawable ns-object conforms to the new VLCPictureInPictureDrawable protocol.

VLCPictureInPictureDrawable protocol provide new apis to start/stop picture in picture and various callbacks to handle user interactions from the picture in picture window's overlay.

Implementing VLCPictureInPictureDrawable.pictureInPictureReady block is mandatory to be notified once picture in picture initialization is done.

This block will pass a id<VLCPictureInPictureWindowControlling> object allowing to start and stop picture in picture.

It will also provide a way to invalidate the state of the playback by calling invalidatePlaybackState, forcing the picture in picture to fetch new media infos like current time or media length from the VLCPictureInPictureDrawable.mediaController.

This module uses Apple public APIs hence it won't work for macOS at this time. Separate work will have to be done in order to provide support for picture in picture private APIs and allow the use of picture in picture on macOS with libvlc.

Needs !6056 (merged) to have proper playback progress in Picture in Picture window overlay.

Edited by Maxime Chapelet

Merge request reports

Loading