Giter Site home page Giter Site logo

ezuikit-flv's Introduction

Ezuikit-flv

Download Version Build Demos

ezuikit-flv 是一款开源的纯H5直播流播放器,通过Emscripten将音视频解码库编译成js(wasm) 运行于浏览器之中。兼容几乎所有浏览器,可以运行在PC、手机、微信中,无需额外安装插件。

功能

  • 支持解码H.264视频
  • 支持解码H.265视频(flv id == 12)
  • 支持2K视频
  • 支持解码AAC音频
  • 可设置播放缓冲区时长,可设置0缓冲极限低延迟(网络抖动会造成卡顿现象)
  • 可创建多个播放实例
  • 手机浏览器内打开长时间不会息屏
  • 支持填充,等比,等比缩放 3种视频缩放模式
  • 支持0,90,180,270度画面旋转
  • 支持MediaSourceExtensions 硬件解码
  • 支持MediaSourceExtensions硬解码失败的情况下自动切换到wasm软解码

npm 使用

npm install ezuikit-flv
import EzuikitFlv from 'ezuikit-flv'

const player = new EzuikitFlv({
    url: "play url", // https://play.com/9999.flv
    container: "container-id", // support element id or element
    decoder: "decoder.js", // 自定义解码库加载地址, 默认放置在服务器根目录下
})

player.play()

umd使用

<div id='container-id'>

<!-- ezuikit-js umd file  `node_modules/ezuikit-flv/index.js`-->
<script src='./index.js'></script>
<script>
const player = new EzuikitFlv({
    url: "play url", // https://play.com/9999.flv
    container: "container-id", // support element id or element
    decoder: "decoder.js", // 自定义解码库加载地址, 默认放置在服务器根目录下
})

player.play()
</script>

注意: 暂不提供CDN地址, decoder静态资源需要放置在自己的服务器下(node_modules/ezuikit-flvdecoder.wasmdecoder.js 文件, 这两个文件需要在同一个文件夹下)

注意: 暂不提供CDN地址,decoder静态资源需要放置在自己的服务器下(node_modules/ezuikit-flvdecoder.wasmdecoder.js 文件, 这两个文件需要在同一个文件夹下)

注意: 暂不提供CDN地址,decoder静态资源需要放置在自己的服务器下(node_modules/ezuikit-flvdecoder.wasmdecoder.js 文件, 这两个文件需要在同一个文件夹下)

配置

options

api

api

examples

base-app

react-app

vue-app

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.