picture-in-picture
Mobile icon

Picture-in-Picture

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 12 Sep (yesterday)
 by 
5.0
 (1 rating)
picture-in-picture

Picture-in-Picture

Documentation
1.0.0

The Picture-in-Picture (PiP) component enables OutSystems mobile apps to use the Cordova PiP Plugin, allowing apps to display content in a floating window while users multitask.

It provides four main client actions:


1. enterPipMode


Description:
Enters Picture-in-Picture mode with the specified window size. This will minimize your app screen into a floating PiP window.

Inputs:

  • width (Integer) → Desired PiP window width in pixels.

  • height (Integer) → Desired PiP window height in pixels.

Notes:

  • OS may override custom sizes (especially iOS).

  • Works best on Android 8.0+ devices.


2. enterPipMode_withVideo


Description:
Similar to enterPipMode, but optimized for apps showing video playback. On supported devices, the OS will treat the PiP window as a video player, enabling system-level PiP controls (play/pause, close).

Inputs:

  • width (Integer) → Desired PiP window width.

  • height (Integer) → Desired PiP window height.

Notes:

  • Especially useful for streaming/video apps.

  • Some platforms (iOS) only allow PiP for video elements.


3. isPip


Description:
Checks whether the app is currently running in PiP mode.

Inputs:

  • None

Outputs:

  • IsPip (Boolean) → Returns True if app is in PiP, else False.


4. isPipModeSupported


Description:
Checks if Picture-in-Picture mode is supported on the current device.

Inputs:

  • None

Outputs:

  • isPipModeSupported (Boolean)True if device supports PiP, False otherwise.


Notes:

  • Use this check before calling enterPipMode or enterPipMode_withVideo.

  • Prevents errors on devices/OS versions that do not support PiP.


Requirements


  • MABS 12+ 

  • Android 8.0 (API 26+) for full support.

  • iOS → PiP primarily works for video playback; custom sizing may be ignored.