mirror of
https://codeberg.org/vlw/pip-canvas.git
synced 2025-09-13 18:33:41 +02:00
Create README.md
This commit is contained in:
parent
366867f1f3
commit
c39ef4b57d
1 changed files with 27 additions and 0 deletions
27
README.md
Normal file
27
README.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# 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
|
||||
|
||||
1. **Clone this repo**
|
||||
|
||||
```
|
||||
git clone https://github.com/VictorWesterlund/pip-canvas.git
|
||||
```
|
||||
|
||||
2. **Import as ESM into your project**
|
||||
```js
|
||||
import { PipCanvas } from "./pip-canvas/PipCanvas.mjs"
|
||||
```
|
||||
|
||||
3. **Initialize `PipCanvas()` with an `HTMLImageElement`**
|
||||
|
||||
```js
|
||||
const pip = new PipCanvas(HTMLImageElement);
|
||||
pip.open();
|
||||
```
|
Loading…
Add table
Reference in a new issue