Skip to content

Commit

Permalink
Merge branch 'master' into typescript-finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
tchakabam committed Aug 15, 2018
2 parents bcef4a4 + 8fcd792 commit 8228e77
Show file tree
Hide file tree
Showing 308 changed files with 5,841 additions and 4,714,179 deletions.
2 changes: 1 addition & 1 deletion .esdoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"source": "./src",
"destination": "./docs/html",
"destination": "./api-docs",
"plugins": [
{"name": "esdoc-standard-plugin"},
{"name": "esdoc-typescript-plugin", "option": {"enable": true}}
Expand Down
1 change: 0 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ npm run test

- Use [EditorConfig](http://editorconfig.org/) or at least stay consistent to the file formats defined in the `.editorconfig` file.
- Develop in a topic branch, not master
- Don't commit the updated `dist/hls.js` file in your PR. We'll take care of generating an updated build right before releasing a new tagged version.

Thanks! :heart: :heart: :heart:
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
### Checklist

- [ ] changes have been done against master branch, and PR does not conflict
- [ ] no commits have been done in dist folder (we will take care of updating it)
- [ ] new unit / functional tests have been added (whenever applicable)
- [ ] API or design changes are documented in API.md
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ coverage/

.idea/*

# Build reports
dist/bundle-analyzer-report.*
# Build
/dist
/gh-pages
/api-docs
80 changes: 62 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,95 @@ node_js: node
# see https://github.com/video-dev/hls.js/pull/1710#discussion_r187754754
sudo: required
# don't connect to sauce labs unless running functional tests
# before_install: if [ "${TRAVIS_MODE}" != "funcTests" ]; then unset SAUCE_USERNAME && unset SAUCE_ACCESS_KEY; fi
before_install: if [ "${TRAVIS_MODE}" != "funcTests" ]; then unset SAUCE_USERNAME && unset SAUCE_ACCESS_KEY; fi
script: ./scripts/travis.sh
after_script: if [ "${TRAVIS_MODE}" = "funcTests" ]; then echo -n "travis_fold:start:sauce_logs\nSauce connect log:\n" && cat /home/travis/sauce-connect.log && echo -n "\ntravis_fold:end:sauce_logs\n"; fi
after_success: npm run coverage
env:
global:
- SAUCE_USERNAME=mangui
stages:
- required
- optional
- buildAndTest
- releaseCanary
- release
- testFuncRequired
- testFuncOptional
jobs:
# stage: optional is allowed to be failure
fast_finish: true
allow_failures:
- stage: optional
- stage: testFuncOptional
include:
# https://docs.travis-ci.com/user/build-stages/deploy-github-releases/
- stage: release
if: tag IS present
env: TRAVIS_MODE=release
deploy:
provider: releases
api_key:
secure: "kR9xHKhWfOv6vwxz1d//PpC22VDupnPI59L9czLkpLoIdzm5rm3eV7he4XPlQfbSrV1UBgURARgF+yekmeqUZk9vqfo4F5oa+6KiBxAdnI9PjsjYRSXitdq4a6kpIR854nxUIOlDXR5AbD2MgNaKsQHiaNlngdR/870OhiwqRJVwQOLKVUADw1QWECXe/DXrQiFbMunxBrTyutbrGuI8cT7wzqFn+aPkI/3liiw8PTr93GrtxZ/bFxI899KzMSHHMXB+eDDMtxPFD+VApruD7h6f+1C0psJeOV8/PkzrRkbPELPBKKaPH9TvVOPUf2OSRHVna828wnLHwseae0rgtuk7+ZJmB9XZKX9FUBDT4/Gv/AkE+m/cwnoqaatAMJYR+yiQqsosjBLDAaTUOPHu3wBdAaR5uL5fGsSsKe3sUfSQHrv86vReNl9ETU06apmyWtsIbyhMtv98j9I+hNVjKZUI30g1ee6LgjlDlBavMk8KAbLbyBTcJlNAexj8Rppdqg+AdW7rYW+S6SgfTyyYQKTLeFwmDjfrkqzHJnk78sV18+xPLI1hbzBGp/bXaW23sLDBLLV5Sxifr8flUMkUdH28zsLCHUQ7C4GKQ19el2NZgIxSsnxRA8vGZof7OXasR4HJVjv/PSx+DN6Fi1PV1SiNBcwgPCGIIxBF7TUPxJk="
file_glob: true
file: dist/*
draft: true
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
skip_cleanup: true
on:
tags: true
# publish canary package if on master
- stage: required
- stage: releaseCanary
if: branch = master AND type != pull_request
env: TRAVIS_MODE=releaseCanary
- stage: buildAndTest
if: tag IS present OR (branch = master AND type != pull_request)
env: TRAVIS_MODE=gh-pages
deploy:
# Need two providers for pages. One watches tags, one watches master
# https://github.com/travis-ci/travis-ci/issues/7780
- provider: pages
github_token:
secure: "kR9xHKhWfOv6vwxz1d//PpC22VDupnPI59L9czLkpLoIdzm5rm3eV7he4XPlQfbSrV1UBgURARgF+yekmeqUZk9vqfo4F5oa+6KiBxAdnI9PjsjYRSXitdq4a6kpIR854nxUIOlDXR5AbD2MgNaKsQHiaNlngdR/870OhiwqRJVwQOLKVUADw1QWECXe/DXrQiFbMunxBrTyutbrGuI8cT7wzqFn+aPkI/3liiw8PTr93GrtxZ/bFxI899KzMSHHMXB+eDDMtxPFD+VApruD7h6f+1C0psJeOV8/PkzrRkbPELPBKKaPH9TvVOPUf2OSRHVna828wnLHwseae0rgtuk7+ZJmB9XZKX9FUBDT4/Gv/AkE+m/cwnoqaatAMJYR+yiQqsosjBLDAaTUOPHu3wBdAaR5uL5fGsSsKe3sUfSQHrv86vReNl9ETU06apmyWtsIbyhMtv98j9I+hNVjKZUI30g1ee6LgjlDlBavMk8KAbLbyBTcJlNAexj8Rppdqg+AdW7rYW+S6SgfTyyYQKTLeFwmDjfrkqzHJnk78sV18+xPLI1hbzBGp/bXaW23sLDBLLV5Sxifr8flUMkUdH28zsLCHUQ7C4GKQ19el2NZgIxSsnxRA8vGZof7OXasR4HJVjv/PSx+DN6Fi1PV1SiNBcwgPCGIIxBF7TUPxJk="
skip_cleanup: true
keep_history: true
committer_from_gh: true
local_dir: gh-pages
verbose: true
on:
tags: true
- provider: pages
github_token:
secure: "kR9xHKhWfOv6vwxz1d//PpC22VDupnPI59L9czLkpLoIdzm5rm3eV7he4XPlQfbSrV1UBgURARgF+yekmeqUZk9vqfo4F5oa+6KiBxAdnI9PjsjYRSXitdq4a6kpIR854nxUIOlDXR5AbD2MgNaKsQHiaNlngdR/870OhiwqRJVwQOLKVUADw1QWECXe/DXrQiFbMunxBrTyutbrGuI8cT7wzqFn+aPkI/3liiw8PTr93GrtxZ/bFxI899KzMSHHMXB+eDDMtxPFD+VApruD7h6f+1C0psJeOV8/PkzrRkbPELPBKKaPH9TvVOPUf2OSRHVna828wnLHwseae0rgtuk7+ZJmB9XZKX9FUBDT4/Gv/AkE+m/cwnoqaatAMJYR+yiQqsosjBLDAaTUOPHu3wBdAaR5uL5fGsSsKe3sUfSQHrv86vReNl9ETU06apmyWtsIbyhMtv98j9I+hNVjKZUI30g1ee6LgjlDlBavMk8KAbLbyBTcJlNAexj8Rppdqg+AdW7rYW+S6SgfTyyYQKTLeFwmDjfrkqzHJnk78sV18+xPLI1hbzBGp/bXaW23sLDBLLV5Sxifr8flUMkUdH28zsLCHUQ7C4GKQ19el2NZgIxSsnxRA8vGZof7OXasR4HJVjv/PSx+DN6Fi1PV1SiNBcwgPCGIIxBF7TUPxJk="
skip_cleanup: true
keep_history: true
committer_from_gh: true
local_dir: gh-pages
verbose: true
on:
branch: master
# Required tests
- stage: required
- stage: buildAndTest
env: TRAVIS_MODE=build
- stage: required
- stage: buildAndTest
env: TRAVIS_MODE=unitTests
- stage: required
- stage: testFuncRequired
env: TRAVIS_MODE=funcTests UA=chrome OS="Windows 10"
# Optional Func tests
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA=firefox OS="Windows 10"
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA=chrome OS="Windows 7"
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA=firefox OS="Windows 7"
# - stage: optional
# - stage: testFuncOptional
# env: TRAVIS_MODE=funcTests UA=MicrosoftEdge OS="Windows 10"
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA="internet explorer" OS="Windows 8.1" UA_VERSION="11.0"
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA="internet explorer" OS="Windows 10"
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA=chrome OS="OS X 10.11"
# - stage: optional
# - stage: testFuncOptional
# env: TRAVIS_MODE=funcTests UA=firefox OS="OS X 10.11"
- stage: optional
- stage: testFuncOptional
env: TRAVIS_MODE=funcTests UA=safari OS="OS X 10.11" UA_VERSION="9.0"
addons:
sauce_connect: true
Expand Down
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![Build Status](https://travis-ci.org/video-dev/hls.js.svg?branch=master)](https://travis-ci.org/video-dev/hls.js)
[![Build Status](https://api.travis-ci.org/video-dev/hls.js.svg?branch=master)](https://travis-ci.org/video-dev/hls.js)
[![npm](https://img.shields.io/npm/v/hls.js.svg?style=flat)](https://npmjs.org/package/hls.js)
[![npm](https://img.shields.io/npm/v/hls.js/canary.svg?style=flat)](https://www.npmjs.com/package/hls.js/v/canary)
[![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)
[![](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/)
Join the discussion via [video-dev.org](http://video-dev.org) in #hlsjs (our Slack channel)

# ![hls.js](https://cloud.githubusercontent.com/assets/616833/19739063/e10be95a-9bb9-11e6-8100-2896f8500138.png)

Expand Down Expand Up @@ -34,17 +33,20 @@ To build our distro bundle and serve our development environment we use [Webpack

## API docs and usage guide

* API and code documention: [http://video-dev.github.io/hls.js/docs/html](http://video-dev.github.io/hls.js/docs/html)
* [API and usage docs, with code examples](https://github.com/video-dev/hls.js/blob/master/docs/API.md)

* Find a more detailed library usage guide, use-cases and example [here](/docs/API.md)
* [Auto-Generated Docs](http://video-dev.github.io/hls.js/docs/html)

## Demo

### Latest Release
[https://video-dev.github.io/hls.js/demo](https://video-dev.github.io/hls.js/demo)

### Canary
[https://video-dev.github.io/hls.js/demo?canary=true](https://video-dev.github.io/hls.js/demo?canary=true)
[https://video-dev.github.io/hls.js/demo?version=canary](https://video-dev.github.io/hls.js/demo?version=canary)

### Local
[https://video-dev.github.io/hls.js/demo?version=local](https://video-dev.github.io/hls.js/demo?version=local)

## Getting Started

Expand Down Expand Up @@ -88,14 +90,15 @@ HTMLVideoElement control and events could be used seamlessly.

|[<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://user-images.githubusercontent.com/4006693/44003595-baff193c-9e8f-11e8-9848-7bb91563499f.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://images.gunosy.com/logo/gunosy_icon_company_logo.png" width="120">](https://gunosy.com)|[<img src="https://user-images.githubusercontent.com/1480052/35802840-f8e85b8a-0a71-11e8-8eb2-eee323e3f159.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)|[<img src="https://static3.1tv.ru/assets/web/logo-8ff7c63246d8df0397233927db52edbb.svg" width="120" height="120">](https://www.1tv.ru/) | [<img src="https://user-images.githubusercontent.com/1480052/40482633-c013ebce-5f55-11e8-96d5-b776415de0ce.png" width="120">](https://www.zdf.de) | [<img src="https://github.com/cdnbye/hlsjs-p2p-engine/blob/master/figs/cdnbye.png" width="120">](https://github.com/cdnbye/hlsjs-p2p-engine)| |
|[<img src="https://streaming.cdn77.com/live-streaming-logo-dark.png" width="120">](https://streaming.cdn77.com/)|
|[<img src="https://streaming.cdn77.com/live-streaming-logo-dark.png" width="120">](https://streaming.cdn77.com/)| [<img src="https://avatars0.githubusercontent.com/u/7442371?s=200&v=4" width="120">](https://r7.com/)|[<img src="https://raw.githubusercontent.com/Novage/p2p-media-loader/gh-pages/images/p2pml-logo.png" width="120">](https://github.com/Novage/p2p-media-loader)




Expand Down Expand Up @@ -123,16 +126,10 @@ made by [gramk](https://github.com/gramk/chrome-hls), plays hls from address bar
- 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)
Prepackaged build is included [with the releases](https://github.com/video-dev/hls.js/releases).

If you want to bundle the application yourself, use node

Expand Down Expand Up @@ -184,6 +181,12 @@ Please note: iOS Safari "Mobile" does not support the MediaSource API. Safari br

When a platform has neither MediaSource nor native HLS support, you will not be able to play HLS.

### Server-side-rendering (SSR) and `require` from a Node.js runtime

We support this now. You can safely require this library in Node and absolutely nothing will happen :) See https://github.com/video-dev/hls.js/pull/1841

(This is also known as "Universal builds" and "isomorphic apps")

## CORS

All HLS resources must be delivered with [CORS headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) permitting `GET` requests.
Expand Down
36 changes: 29 additions & 7 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

<link rel="stylesheet" href="style.css">

<link rel="preload" href="../dist/hls-demo.js" as="script">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>
Expand Down Expand Up @@ -301,14 +299,38 @@ <h4>Buffer &amp; Statistics</h4>
document.body.appendChild(s);
}

// load compiled lib dist, or latest canary from jsdelivr (?canary=true)
var src = window.location.search.substring(1).split('&').indexOf('canary=true') >= 0
? 'https://cdn.jsdelivr.net/npm/hls.js@canary'
: '../dist/hls.js';
var LOCAL_DIST_SRC = '../dist/hls.js';
var LATEST_DIST_SRC = 'https://cdn.jsdelivr.net/npm/hls.js@latest';
var LOCAL_DEMO_SRC = '../dist/hls-demo.js';
var CANARY_DEMO_SRC = 'https://cdn.jsdelivr.net/npm/hls.js@canary/dist/hls-demo.js';

var queryParts = window.location.search.substring(1).split('&');
var src = null;
var demoSrc = null;
if (queryParts.indexOf('version=latest') >= 0) {
src = LATEST_DIST_SRC;
demoSrc = CANARY_DEMO_SRC;
} else if (queryParts.indexOf('version=canary') >= 0 || queryParts.indexOf('canary=true') >= 0) {
src = 'https://cdn.jsdelivr.net/npm/hls.js@canary';
demoSrc = CANARY_DEMO_SRC;
} else if (queryParts.indexOf('version=local') >= 0) {
src = LOCAL_DIST_SRC;
demoSrc = LOCAL_DEMO_SRC;
}
if (!src) {
if (window.location.port) {
// we are not on port 80/443. Probably running locally. default to local
src = LOCAL_DIST_SRC;
demoSrc = LOCAL_DEMO_SRC;
} else {
src = LATEST_DIST_SRC;
demoSrc = CANARY_DEMO_SRC;
}
}

loadScript(src, function() {
// load compiled demo main
loadScript('../dist/hls-demo.js');
loadScript(demoSrc);
});
})();
</script>
Expand Down
Loading

0 comments on commit 8228e77

Please sign in to comment.