taihangren90 / FlvPlayer

:lollipop: FlvPlayer.js is a JavaScript player for decode flv to the canvas

Home Page:https://zhw2590582.github.io/FlvPlayer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FlvPlayer

Build Status version license size npm Downloads PRs Welcome dependencies Status

FlvPlayer.js is a JavaScript player for decode flv to the canvas

Demo

Play online demo

Play local demo

Install

Install with npm

$ npm install flvplayer

Or install with yarn

$ yarn add flvplayer
import FlvPlayer from 'flvplayer';
import 'flvplayer/dist/flvplayer.css';

Or umd builds are also available

<link rel="stylesheet" href="path/to/flvplayer.css" />
<script src="path/to/flvplayer.js"></script>

Will expose the global variable to window.FlvPlayer.

Usage

<div class="flvplayer-app"></div>
var flv = new FlvPlayer({
    container: '.flvplayer-app', // A div dom element
    url: 'path/to/video.flv', // Url of flv video file
    poster: 'path/to/poster.png', // Url of video poster, the first frame of the video is taken as the poster by default
    debug: false, // Show debug information on developer tools
    live: false, // Whether live video
    loop: false, // Whether to automatically loop play
    hotkey: true, // Whether to use hotkeys
    controls: true, // Whether to display the controller
    hasAudio: true, // Whether to include audio
    volume: 7, // Default volume, ranging from 0 to 10
    frameRate: 30, // Video frame rate, which will be extracted from the flv file by default
    width: 400, // Video default width, which will be extracted from the flv file by default
    height: 300, // Video default height, which will be extracted from the flv file by default
});

QQ Group

QQ Group

License

MIT © Harvey Zack

About

:lollipop: FlvPlayer.js is a JavaScript player for decode flv to the canvas

https://zhw2590582.github.io/FlvPlayer/

License:MIT License


Languages

Language:JavaScript 89.2%Language:CSS 10.8%