mirror of
https://codeberg.org/vlw/pip-canvas.git
synced 2025-09-13 18:33:41 +02:00
Library (or something) for opening DOMElements in Picture-in-Picture.
.gitignore | ||
LICENSE | ||
PipCanvas.mjs | ||
README.md |
pip-canvas
Open DOM elements in Picture-in-Picture with the help of <canvas>
, <video>
and JavaScript. This is a librabry/API sorta, kinda thing.
Early Access
Only HTMLImageElement
is supported at this time, but I intend to add more elements later. As well as support for URL
and URL strings.
Get started
- Clone this repo
git clone https://github.com/VictorWesterlund/pip-canvas.git
- Import as ESM into your project
import { PipCanvas } from "./pip-canvas/PipCanvas.mjs"
- Initialize
PipCanvas()
with anHTMLImageElement
const pip = new PipCanvas(HTMLImageElement);
pip.open();