Giter Site home page Giter Site logo

walkerchan2019 / avplayer.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yangq1990/avplayer.js

0.0 0.0 0.0 1.15 MB

一个根据浏览器环境决定生成flash或html5播放器的js sdk,支持播放hls/mp4,支持播放自定义加密ts

JavaScript 100.00%

avplayer.js's Introduction

avplayer.js

一个根据浏览器环境决定生成html5或flash播放器的js sdk,支持播放hls/mp4,支持播放自定义加密ts。

在支持MediaSourceExtensions的浏览器上,sdk会优先生成html5播放器; 在IE6~IE11等浏览器上,sdk会优先生成flash播放器;同时sdk提供一个参数preferFlash,此参数设为1的时候,sdk会无视浏览器环境生成flash播放器。

此项目代码主要参考(copy)了hls.js https://github.com/video-dev/hls.js/tree/master
做了以下微小的工作:
1) 支持播放自定义加密的ts
2) 优化音视频处理(demux-remux)逻辑,兼容更多异常视频
3) 接入flash(https://github.com/yangq1990/avplayer-flash/tree/master) 作为fallback,提供一个pc浏览器、移动端浏览器等web端的播放器解决方案
4) 优化代码结构,方便协同开发

How to use:
  git clone https://github.com/yangq1990/avplayer.js.git
  cd avplayer.js
  npm install    #安装项目依赖
  npm run build   #生成avplayer.js
  npm run release  #生成压缩版 avplayer.min.js
  npm run serve   #运行server
  npm run open    #打开demo目录的index.html

avplayer.js's People

Contributors

yangq1990 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.