Skip to content

Cordova plugin to enable Picture in Picture feature for Android > 8.0

Notifications You must be signed in to change notification settings

OutSystemsExperts/outsystems-experts-plugins-pip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PIP Plugin

Cordova plugin to enable PictureinPicture support for android > 8.0

Based on the plugin cordova-plugin-pip present in the npm repository.

API

Methods:

  • enter(width: int, height:int, success: function, error: function)

    • Call to enter pip mode. It receives the with and height in pixels of the desired pip window. Example:
        cordova.plugins.PIPPlugin.enter(200,400,
              function(){console.log("Entered Pip Mode")},
              function(error){console.log(error)});
  • isPip(success: function, error: function)

    • Call to check if it is in pip mode. Returns true or false in the success function. Example:
        cordova.plugins.PIPPlugin.isPip(
          function(result){console.log(result)},
          function(error){console.log(error)});
  • isPipModeSupported(success: function, error: function)

    • Call to check if pip mode is supported. Returns true or false in the success function.
        cordova.plugins.PIPPlugin.isPipModeSupported(
          function(result){console.log(result)},
          function(error){console.log(error)});
  • onPipModeChanged(success: function, error: function)

    • Call to register and handle pip-mode-changed events
        cordova.plugins.PIPPlugin.onPipModeChanged(
          function(result){console.log(result)},
          function(error){console.log(error)});

About

Cordova plugin to enable Picture in Picture feature for Android > 8.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published