# videojscarh265

> Video.js' Tech for FLV+H.265/H.264

Latest version **1.1.1** (published 2020-11-26) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install videojscarh265
pnpm add videojscarh265
yarn add videojscarh265
bun add videojscarh265
```

## 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.1 |
| Published | 2020-11-26 |
| First published | 2020-11-26 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 78 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 77 |
| Author | coffe1891 |
| Maintainers | huquan |
| Keywords | videojs-flvh265, videojs, videojs-tech, h265, h264, flv, playback |

## Links

- npm: https://www.npmjs.com/package/videojscarh265
- Repository: https://github.com/coffe1891/videojs-flvh265
- Homepage: https://github.com/coffe1891/videojs-flvh265#readme
- Issues: https://github.com/coffe1891/videojs-flvh265/issues
- npm.io page: https://npm.io/package/videojscarh265

## Dependencies (2)

- [video.js](https://npm.io/package/video.js.md) ^7
- [wx-inline-player-new](https://npm.io/package/wx-inline-player-new.md) ^1.0.9

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2020-11-26
- 1.1.0 — 2020-11-26

## README

# videojs-flvh265

This is a Video.js [Tech](https://docs.videojs.com/tutorial-tech_.html) for FLV + H265.
Make [Video.js](https://videojs.com/) has the ability to play flv + live/local video encoded with h264/h265.It's decoder comes from [WXInlinePlayer](https://github.com/coffe1891/WXInlinePlayer).

## Features
Format↓  | H.264 | H.265 | live stream | local file | seek | comment
---------|-------|-------|-------------|------------|------|-------------
**.flv** | √     | √     | √           | √          | ×    |
**.mp4** | ×     | ×     | ×           | ×          | ×    | coming soon
**.ts**  | ×     | ×     | ×           | ×          | ×    | no plan

## Installation

```sh
npm install --save videojs-flvh265
```

## Localhost DEMO

```sh
npm run serve
```

## Quick start

This is the simplest case. Get the script in whatever way you prefer and include the plugin _after_ you include **video.js**, so that the `videojs` global is available.

### 1. Using `<script>` Tag
```html
<link href="/node_modules/video.js/dist/video-js.css" rel="stylesheet">
<video id="player" 
  height="300" 
  width="600" 
  class="video-js vjs-big-play-centered"
  controls
  autoplay
  loop
  ish265
  islive
  hasvideo
  hasaudio
>
  <source src="http://localhost:8080/src/5s_265.flv" type='video/x-flv'/>
</video>`
<script src="/node_modules/video.js/dist/video.js"></script>
<script src="/node_modules/videojs-flvh265/dist/videojs-flvh265.js"></script>
<script>
videojs('player', {
  techOrder: [
    'html5',
    'flvh265'
  ],
  controlBar:{
    pictureInPictureToggle:false //sorry,we don't support pictureInPicture now
  }
});
</script>
```

### 2. Using ECMAScript `import` and Webpack
And this javascript library supports UMD also.
```javascript
import videojs from 'video.js';
import 'videojs-flvh265';
videojs('player', {
  techOrder: [
    'html5',
    'flvh265'
  ],
  controlBar:{
    pictureInPictureToggle:false //sorry,we don't support pictureInPicture now
  }
});
```

## Custom attributes for `<video>` Tag
```JavaScript
ish265    // boolean  : true/false
          //            true means that video is encoded with h265, false means h264.

islive    // boolean

hasvideo  // boolean

hasaudio  // boolean

lib       // string   : Folder path of libs.
          //            Default value of lib is "/node_modules/wx-inline-player-new/example/".
          //            Most of the time, you must set libs folder path,just copy these libs from 
          //            "/node_modules/wx-inline-player-new/example/" to your final folder,then set
          //            lib="the final folder path",e.g. lib="https://www.domain.com/libs/"
```

## Events
support these events of Video.js
```

  loadstart
  loadedmetadata
  play
  pause
  playing
  waiting
  ended
  volumechange
  durationchange
  error

```

## Reference
  * [FLV wikipedia](https://zh.wikipedia.org/wiki/Flash_Video#FLV%E6%96%87%E4%BB%B6%E6%9E%84%E6%88%90)
  * [FLV cnblogs](https://www.cnblogs.com/lidabo/p/9018548.html)


## License

GPL Version 2. Copyright (c) [coffe1891](https://github.com/coffe1891).

## Contact me

* Email: kai521@gmail.com
* Webchat: kenny2019

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