[![Build Status](https://travis-ci.org/video-dev/hls.js.svg?branch=master)](https://travis-ci.org/video-dev/hls.js)
[![npm][npm-image]][npm-url]
[![Greenkeeper badge](https://badges.greenkeeper.io/video-dev/hls.js.svg)](https://greenkeeper.io/)
[![](https://data.jsdelivr.com/v1/package/npm/hls.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/hls.js)
Join the discussion on [Slack#hlsjs](http://video-dev.org) [![Slack Status](http://video-dev.org/badge.svg)](http://video-dev.org/)
# ![hls.js](https://cloud.githubusercontent.com/assets/616833/19739063/e10be95a-9bb9-11e6-8100-2896f8500138.png)
hls.js is a JavaScript library which implements an [HTTP Live Streaming] client.
It relies on [HTML5 video][] and [MediaSource Extensions][] for playback.
It works by transmuxing MPEG-2 Transport Stream and AAC/MP3 streams into ISO BMFF (MP4) fragments.
This transmuxing could be performed asynchronously using [Web Worker] if available in the browser.
hls.js also supports HLS + fmp4, as announced during [WWDC2016](https://developer.apple.com/videos/play/wwdc2016/504/)
hls.js does not need any player, it works directly on top of a standard HTML```<video>```element.
hls.js is written in [ECMAScript6], and transpiled in ECMAScript5 using [Babel].
[HTML5 video]: http://www.html5rocks.com/en/tutorials/video/basics/
[MediaSource Extensions]: http://w3c.github.io/media-source/
[HTTP Live Streaming]: http://en.wikipedia.org/wiki/HTTP_Live_Streaming
[Web Worker]: http://caniuse.com/#search=worker
[ECMAScript6]: https://github.com/ericdouglas/ES6-Learning#articles--tutorials
[Babel]: https://babeljs.io
## Demo
[http://video-dev.github.io/hls.js/demo](http://video-dev.github.io/hls.js/demo)
## Getting Started
```html
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video"></video>
<script>
if(Hls.isSupported()) {
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource('https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
</script>
```
## Video Control
Video is controlled through HTML ```<video>``` element.
HTMLVideoElement control and events could be used seamlessly.
## they use hls.js in production !
|[<img src="http://i.cdn.turner.com/adultswim/big/img/global/adultswim.jpg" width="120">](http://www.adultswim.com/videos/streams)|[<img src="https://www.akamai.com/fr/fr/multimedia/images/logo/akamai-logo.png" width="120">](https://www.akamai.com)|[<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Canal%2B.svg/2000px-Canal%2B.svg.png" width="120">](https://www.canalplus.fr)|[<img src="https://avatars2.githubusercontent.com/u/115313" width="120">](http://www.dailymotion.com)|
|---|---|---|---|
|[<img src="https://cloud.githubusercontent.com/assets/13046636/23291526/938b9bb6-fa9c-11e6-8d6a-cd50a8f5903f.png" width="120">](https://freshlive.tv)|[<img src="https://flowplayer.org/media/img/logo-blue.png" width="120">](http://www.flowplayer.org)|[<img src="https://avatars1.githubusercontent.com/u/12554082?s=240" width="120">](http://www.foxsports.com.au)|[<img src="https://cloud.githubusercontent.com/assets/244265/12556435/dfaceb48-c353-11e5-971b-2c4429725469.png" width="120">](http://www.globo.com)|
|[<img src="https://cloud.githubusercontent.com/assets/13573755/20111430/80a6bebc-a5e8-11e6-8dc1-619b1e936f6d.png" width="120">](https://www.gl-systemhaus.de/)|[<img src="https://cloud.githubusercontent.com/assets/6525783/20801836/700490de-b7ea-11e6-82bd-e249f91c7bae.jpg" width="120">](http://nettrek.de/)|[<img src="https://cloud.githubusercontent.com/assets/244265/12556385/999aa884-c353-11e5-9102-79df54384498.png" width="120">](https://www.nytimes.com/)|[<img src="https://cloud.githubusercontent.com/assets/1798553/20356424/ba158574-ac24-11e6-95e1-1ae591b11a0a.png" width="120">](https://www.peer5.com/)|
|[<img src="https://cloud.githubusercontent.com/assets/4909096/20925062/e26e6fc8-bbb4-11e6-99a5-d4762274a342.png" width="120">](http://qbrick.com/)|[<img src="https://www.radiantmediaplayer.com/images/radiantmediaplayer-new-logo-640.jpg" width="120">](https://www.radiantmediaplayer.com/)|[<img src="https://camo.githubusercontent.com/eacade2264a6325191b6cb9bf7a8c0d05a5b628d/68747470733a2f2f7777772e7274732e63682f68756d6d696e67626972642f7265732f696d616765732f7274732f6c6f676f2d7274732d726f7567652e737667" width="120">](http://www.rts.ch/)|[<img src="https://cloud.githubusercontent.com/assets/12702747/19316434/0a3601de-9067-11e6-85e2-936b1cb099a0.png" width="120">](https://www.snapstream.com/)|
|[<img src="https://www.streamamg.com/wp-content/themes/barebones/_assets/images/streamamg-logo.png" width="120">](https://www.streamamg.com/)|[<img src="https://streamsharkio.sa.metacdn.com/wp-content/uploads/2015/10/streamshark-dark.svg" width="120">](https://streamshark.io/)|[<img src="https://camo.githubusercontent.com/9580f10e9bfa8aa7fba52c5cb447bee0757e33da/68747470733a2f2f7777772e7461626c6f74762e636f6d2f7374617469632f696d616765732f7461626c6f5f6c6f676f2e706e67" width="120">](http://my.tablotv.com/)|[<img src="https://user-images.githubusercontent.com/2803310/34083705-349c8fd0-e375-11e7-92a6-5c38509f4936.png" width="120">](https://www.streamroot.io/)|
|[<img src="http://vignette1.wikia.nocookie.net/tedtalks/images/c/c0/TED_logo.png/revision/20150915192527" width="120">](https://www.ted.com/)|[<img src="https://www.seeklogo.net/wp-content/uploads/2014/12/twitter-logo-vector-download.jpg" width="120">](https://twitter.com/)|[<img src="https://cloud.githubusercontent.com/assets/8201317/20566816/bc33f51c-b196-11e6-9bd3-afb71a06460b.png" width="120">](http://vwflow.com)|[<img src="http://media.mtvnservices.com/edge/hosted/Viacom_logo.svg" width="120">](https://www.viacom.com/)|
|[<img src="https://user-images.githubusercontent.com/1181974/29248959-efabc440-802d-11e7-8050-7c1f4ca6c607.png" width="120">](https://vk.com/)|[<img src="https://s3.amazonaws.com/uploads.hipchat.com/87223/4876411/7Rybnl26ReFzlt3/jw-logo-red.png" width="120">](https://www.jwplayer.com)|[<img src="https://staticftv-a.akamaihd.net/arches/francetv/default/img/og-image.jpg?20161007" width="120">](https://www.france.tv)|[<img src="http://showmax.akamaized.net/e/logo/showmax_black.png" width="120">](https://tech.showmax.com)|
## Player Integration
hls.js is (being) integrated in the following players:
- [Akamai Adaptive Media Player (AMP)](https://www.akamai.com/us/en/solutions/products/media-delivery/adaptive-media-player.jsp)
- [Clappr](https://github.com/clappr/clappr)
- [Flowplayer](https://www.flowplayer.org) through [flowplayer-hlsjs](https://github.com/flowplayer/flowplayer-hlsjs)
- [MediaElement.js](http://www.mediaelementjs.com)
- [Videojs](http://videojs.com) through [Videojs-hlsjs](https://github.com/benjipott/videojs-hlsjs)
- [Videojs](http://videojs.com) through [videojs-hls.js](https://github.com/streamroot/videojs-hls.js). hls.js is integrated as a SourceHandler -- new feature in Video.js 5.
- [Videojs](http://videojs.com) through [videojs-contrib-hls.js](https://github.com/Peer5/videojs-contrib-hls.js). Production ready plug-in with full fallback compatibility built-in.
## Chrome/Firefox integration
made by [gramk](https://github.com/gramk/chrome-hls),plays hls from address bar and m3u8 links
- Chrome [native-hls](https://chrome.google.com/webstore/detail/native-hls-playback/emnphkkblegpebimobpbekeedfgemhof)
- Firefox [native-hls](https://addons.mozilla.org/en-US/firefox/addon/native_hls_playback/)
## Dependencies
No external JS libs are needed.
Prepackaged build is included in the [dist](dist) folder:
- [hls.js](dist/hls.js)
- [hls.min.js](dist/hls.min.js)
- [hls.light.js](dist/hls.light.js)
- [hls.light.min.js](dist/hls.light.min.js)
If you want to bundle the application yourself, use node
```
npm install hls.js
```
**NOTE:** `hls.light.*.js` dist files do not
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
H5视频播放工具hls.js (115个子文件)
.babelrc 139B
.editorconfig 291B
.gitignore 154B
index.html 47KB
metrics.html 4KB
hlsjs.html 4KB
video-tag-hijack.html 2KB
617.html 2KB
benchmark.html 1KB
index.html 1KB
hls.js 601KB
hls.light.js 450KB
hls.min.js 213KB
hls.light.min.js 156KB
stream-controller.js 65KB
cea-608-parser.js 37KB
audio-stream-controller.js 35KB
tsdemuxer.js 35KB
mp4-remuxer.js 32KB
playlist-loader.js 30KB
buffer-controller.js 22KB
playlist-loader.js 22KB
mp4-inspector.js 20KB
mp4-generator.js 19KB
canvas.js 19KB
abr-controller.js 16KB
level-controller.js 13KB
jsonpack.js 13KB
hls.js 13KB
vttparser.js 13KB
timeline-controller.js 10KB
mp4demuxer.js 10KB
id3.js 9KB
exp-golomb.js 9KB
adts.js 9KB
events.js 8KB
aes-decryptor.js 8KB
vttcue.js 8KB
hlsjs.js 8KB
attr-list.js 7KB
webvtt-parser.js 6KB
metrics.js 6KB
discontinuities.js 6KB
subtitle-track-controller.js 6KB
subtitle-stream-controller.js 6KB
config.js 6KB
demuxer.js 5KB
level-helper.js 5KB
xhr-loader.js 5KB
webpack.config.js 5KB
mpegaudio.js 5KB
audio-track-controller.js 5KB
demuxer-inline.js 4KB
cap-level-controller.js 4KB
errors.js 4KB
sample-aes.js 4KB
buffer-helper.js 4KB
fragment-loader.js 3KB
discontinuities.js 3KB
key-loader.js 3KB
aac.js 3KB
fps-controller.js 3KB
mp3demuxer.js 3KB
demuxer-worker.js 3KB
aacdemuxer.js 3KB
decrypter.js 2KB
output-filter.js 2KB
karma.conf.js 2KB
fetch-loader.js 2KB
attr-list.js 2KB
id3-track-controller.js 2KB
event-handler.js 2KB
ewma-bandwidth-estimator.js 2KB
cues.js 2KB
cap-level-controller.js 2KB
codecs.js 2KB
logger.js 2KB
dummy-remuxer.js 2KB
ewma-bandwidth-estimator.js 2KB
binary-search.js 1KB
abr-controller.js 1KB
binary-search.js 1KB
ewma.js 968B
events.js 929B
is-supported.js 818B
passthrough-remuxer.js 798B
output-filter.js 711B
foldersize.js 436B
hex.js 298B
timeRanges.js 288B
fast-aes-key.js 249B
aes-crypto.js 219B
empty.js 192B
tests.webpack.js 190B
dummy.js 187B
mediasource-helper.js 170B
.jshintrc 865B
streams.json 2KB
package.json 2KB
bower.json 416B
共 115 条
- 1
- 2
资源评论
- 公众号:程序员之路2020-09-01下载该资源后可以进行评论
江山夜雨
- 粉丝: 27
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于spark-streaming的实时计算系统+源代码+文档说明
- 基于Spark框架的改进并行化综合能源客户识别+源代码+文档说明
- 基于python torndo实现Rest API服务,用于远程提交spark,查询yarn任务状态和日志地址+源代码+文档说明
- 基于spark的日志分析工具+源代码+文档说明
- 基于Spark的机器学习代码+源代码+文档说明
- 基于Spark的图书推荐算法+源代码+文档说明
- 一个基于Spark的电商系统+源代码+文档说明
- 基于Python Spark的大数据分析+源代码+文档说明
- ubuntu18.04安装pycharm2023.3.5
- 基于spark的电影推荐系统+源代码+文档说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功