Skip to content

geektry/easy-flv.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

easy-flv.js

1. Features

  • Provide a easier way to use Bilibili/flv.js
  • Support simple statistics info outputted in console
  • Automatic reload player when network is unstable

2. Get Started

Please refer to easy-flv-demo.html

3. Documents

3.1 Configurations

const easyFlvJs = new EasyFlvJs({
    parameter: value
});

Parameters

Parameter Necessary Type Default Description
playVideoElementId M String - The player <video> id
playUrlInputElementId M String - The play url <input> id
playButtonElementId M String - The play button <button> id
playButtonDisabledSeconds O Number 2 After the button been pressed, it will be disabled for [N]s to avoid play problems
taskCycleSeconds O Number 5 The statistics info will be outputted in console every [N]s
maxReloadDelayCycles O Number 2 If decoded frames do not increase after [N] cycles, the player will be reloaded
maxBufferedFrameSeconds O Number 5 If number of buffered frame seconds is over than [N]s, the player will be reloaded

3.2 Methods

easyFlvJs.method();

Methods

Method Description
void init() Init player with given configuration
void play() Play live stream

Releases

No releases published

Packages

No packages published