GithubHelp home page GithubHelp logo

taihangren90 / flvplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhw2590582/flvplayer

0.0 0.0 0.0 5.84 MB

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

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

License: MIT License

JavaScript 89.19% CSS 10.81%

flvplayer's Introduction

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

flvplayer's People

Contributors

zhw2590582 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.