# beaker-video-player

> A video player module for beaker browser which understands how to pick up subtitles, playlist etc for you

Latest version **1.1.0** (published 2018-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install beaker-video-player
pnpm add beaker-video-player
yarn add beaker-video-player
bun add beaker-video-player
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-04-13 |
| First published | 2018-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 311.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | coderatlabs@gmail.com, suthar.ashok@outlook.com |
| Maintainers | aks- |

## Links

- npm: https://www.npmjs.com/package/beaker-video-player
- npm.io page: https://npm.io/package/beaker-video-player

## Dependencies (6)

- [path](https://npm.io/package/path.md) ^0.12.7
- [from2](https://npm.io/package/from2.md) ^2.3.0
- [leven](https://npm.io/package/leven.md) ^2.1.0
- [is-options](https://npm.io/package/is-options.md) ^1.0.1
- [srt-to-vtt](https://npm.io/package/srt-to-vtt.md) ^1.1.2
- [concat-stream](https://npm.io/package/concat-stream.md) ^1.6.2

## Recent versions

- 1.1.0 (latest) — 2018-04-13
- 1.0.0 — 2018-04-13

## README

# beaker-video-player

* beaker-video-player works with dat links apart from working with as any other HTML5 video player does.
* It would automatically find the subtitles(srt, vtt) for you in dat directory.
* Given a playlist(m3u only) dat link, it returns `next, prev` functions which you can use to navigate through playlist.

```
npm install beaker-video-player
```

## example

``` js
const videoPlayer = require('beaker-video-player')
const url = 'dat://1047fec2e6c4bc9756811a768396912ce89af5f691b7fbbabad3d10/playlist.m3u'

// classname is optional, you can also pass just url string like -- videoPlayer(url)
const { el, prev, next } = videoPlayer({ url, classname: 'foobar' })
el.setAttribute('controls', true)
el.setAttribute('autoplay', true)
el.setAttribute('height', 500)
el.setAttribute('width', 500)

document.body.appendChild(el)

document.getElementById('next-video').addEventListener('click', () => {
  next()
})

document.getElementById('prev-video').addEventListener('click', () => {
  prev()
})


```

## License

MIT

---
_Source: https://npm.io/package/beaker-video-player · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
