-
hls with ts format
-
hls with fmp4 format
-
hls ts with AES-128 decrypt
-
abr
-
hls ts live with abr
-
http-flv live
-
websocket flv live
<script src="https://cdn.jsdelivr.net/npm/vod-fp-player@latest/lib/vod-fp-player.min.js"></script>
npm install vod-fp-player --save
import Vod from "vod-fp-player"
const vod = new Vod({
[Vod.Configs.MAX_BUFFER_LENGTH]: 60,
[Vod.Configs.MAX_FLY_BUFFER_LENGTH]: 30,
});
const media = document.querySelector('video');
media.addEventListener('loadedmetadata', () => {
media.play().catch((e) => {
// not allowed auto play
});
});
vod.attachMedia(media);
vod.loadSource('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8');
vod.on(Vod.Events.ERROR, (e) => {
// do someting when error occur
});
git clone git@github.com:xiyuyizhi/vod-fp.js.git
npm install lerna -g
lerna bootstrap
npm run build:mux
npm run build:util
npm run build:player
npm run build:demo
npm run dev
npm run demo