Giter VIP home page Giter VIP logo

vod-fp.js's Introduction

vod-fp.js

features

  • 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

some notes

base usage

used in browser direct

<script src="https://cdn.jsdelivr.net/npm/vod-fp-player@latest/lib/vod-fp-player.min.js"></script>

used as module

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
});

usage details

development

media asserts

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

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.