# @guzzj/clappr-pip-plugin

> A plugin for clappr which adds support for picture-in-picture on devices which support it.

Latest version **2.0.4** (published 2021-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @guzzj/clappr-pip-plugin
pnpm add @guzzj/clappr-pip-plugin
yarn add @guzzj/clappr-pip-plugin
bun add @guzzj/clappr-pip-plugin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2021-05-12 |
| First published | 2021-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 185.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Jenkinson |
| Maintainers | guzz-junqueira |

## Links

- npm: https://www.npmjs.com/package/@guzzj/clappr-pip-plugin
- Repository: https://github.com/guzz/clappr-pip-plugin
- Homepage: https://github.com/guzz/clappr-pip-plugin#readme
- Issues: https://github.com/guzz/clappr-pip-plugin/issues
- npm.io page: https://npm.io/package/@guzzj/clappr-pip-plugin

## Recent versions

- 2.0.4 (latest) — 2021-05-12
- 2.0.3 — 2021-05-12
- 2.0.2 — 2021-05-10
- 2.0.1 — 2021-05-08

## README

[![npm version](https://badge.fury.io/js/clappr-pip-plugin.svg)](https://badge.fury.io/js/clappr-pip-plugin)
# Clappr Picture-In-Picture Plugin
A plugin for clappr which adds support for picture-in-picture on devices which support it, currently iOS on some models.

![Screenshot](screenshot.png)

# Usage
Add both Clappr and the pip plugin scripts to your HTML:

```html
<head>
  <script type="text/javascript" src="http://cdn.clappr.io/latest/clappr.min.js"></script>
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr-pip-plugin@latest/dist/clappr-pip-plugin.js"></script>
</head>
```

You can also find the project on npm: https://www.npmjs.com/package/clappr-pip-plugin

Then just add `ClapprPIPPlugin` into the list of plugins of your player instance.

```javascript
var player = new Clappr.Player({
  source: "http://your.video/here.mp4",
  plugins: [ClapprPIPPlugin]
});
```
That's it, a button will be shown on the media control to enable picture in picture on devices which support it.

# Demo
To run the demo start a web server with the root directory being the root of this repo, and then browse to the "index.html" file in the "demo" folder.

I am also hosting a demo at http://tjenkinson.me/clappr-pip-plugin/

# Development
Install dependencies:

`npm install`

Build:

`npm run build`

Minified version:

`npm run release`

---
_Source: https://npm.io/package/@guzzj/clappr-pip-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
