android-components / mozilla.components.feature.session / PictureInPictureFeature

PictureInPictureFeature

class PictureInPictureFeature (source)

A simple implementation of Picture-in-picture mode if on a supported platform.

Parameters

sessionManager - Session Manager for observing the selected session’s fullscreen mode changes.

activity - the activity with the EngineView for calling PIP mode when required; the AndroidX Fragment doesn’t support this.

pipChanged - a change listener that allows the calling app to perform changes based on PIP mode.

Constructors

Name Summary
<init> PictureInPictureFeature(sessionManager: SessionManager, activity: <ERROR CLASS>, pipChanged: (Boolean) -> Unit? = null)
A simple implementation of Picture-in-picture mode if on a supported platform.

Functions

Name Summary
enterPipModeCompat fun enterPipModeCompat(): Boolean
onHomePressed fun onHomePressed(): Boolean
onPictureInPictureModeChanged fun onPictureInPictureModeChanged(enabled: Boolean): Unit?

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.