use-pip
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

usePip

A custom React hook to use Picture in Picture mode in supported browsers.

Usage:

const { loading, error, toggle } = usePip(videoRef);

Parameters:

Parameter description required? default
videoRef Ref for the video element true null

Return:

Name Description Type
loading boolean Manages loading time for setting for detecting support
error string Error state as described by spec
toggle function toggles state of PiP in document

Dependencies (0)

    Dev Dependencies (22)

    Package Sidebar

    Install

    npm i use-pip

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    22 kB

    Total Files

    21

    Last publish

    Collaborators

    • agney