Skip to content

Commit

Permalink
Merge branch 'feature/v1.0.0' into LHLS
Browse files Browse the repository at this point in the history
* feature/v1.0.0: (69 commits)
  Mark fpsController event handling as protected.
  Mark cap-level-controller events as protected for overriding.
  Marked BufferController events as protected available for overriding.
  Set AbrController to have protected fields for extension.
  change MP4Types to Record<string, number[]>
  access payload via rest parameters instead of arguments object
  Revert "Convert mp4-generator to TypeScript"
  Convert mp4-generator to TypeScript
  Update chromedriver.
  Remove @babel/register usage on functional tests.
  Match source branch unused var warning for TS.
  Convert mp4-generator to TypeScript
  Convert number-isFinite to TypeScript
  Add back event name to functional test listeners.
  Update tests to have a first parameter as the event name.
  Fix eslint issues on demo js.
  Working towards making event emitter less of a breaking change.
  Update esdoc to handle Babel v7 SpreadProperty -> SpreadElement.
  Update esdoc
  fix: Fix indent
  ...
  • Loading branch information
Rob Walch committed Jan 23, 2020
2 parents 6418002 + ab1b9db commit 466d98e
Show file tree
Hide file tree
Showing 71 changed files with 5,461 additions and 2,933 deletions.
9 changes: 5 additions & 4 deletions .esdoc.json
Expand Up @@ -2,12 +2,13 @@
"source": "./src",
"destination": "./api-docs",
"plugins": [
{"name": "esdoc-standard-plugin"},
{"name": "esdoc-typescript-plugin", "option": {"enable": true}},
{"name": "@itsjamie/esdoc-standard-plugin"},
{"name": "@itsjamie/esdoc-typescript-plugin", "option": {"enable": true}},
{
"name": "esdoc-ecmascript-proposal-plugin",
"name": "@itsjamie/esdoc-ecmascript-proposal-plugin",
"option": {
"objectRestSpread": true
"objectRestSpread": true,
"optionalChaining": true
}
}
]
Expand Down
25 changes: 17 additions & 8 deletions .eslintrc.js
Expand Up @@ -106,7 +106,6 @@ module.exports = {
'no-empty': 1,
'no-mixed-operators': 1,
'no-unused-vars': 2,
'@typescript-eslint/no-unused-vars': 1,
'no-console': 1,
'no-fallthrough': 1,
'no-case-declarations': 2,
Expand All @@ -122,12 +121,22 @@ module.exports = {
'no-void': 0,
'no-useless-catch': 2,
'lines-between-class-members': 2,
'no-prototype-builtins': 0,
'@typescript-eslint/consistent-type-assertions': [ 2,
{
'assertionStyle': 'as',
'objectLiteralTypeAssertions': 'never'
'no-prototype-builtins': 0
},
'overrides': [
{
'files': ['*.ts'],
'rules': {
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': 1,
'@typescript-eslint/prefer-optional-chain': 2,
'@typescript-eslint/consistent-type-assertions': [ 2,
{
'assertionStyle': 'as',
'objectLiteralTypeAssertions': 'never'
}
]
}
]
}
}
]
};
23 changes: 13 additions & 10 deletions README.md
Expand Up @@ -69,13 +69,13 @@ Find the commit on [https://github.com/video-dev/hls.js/blob/deployments/README.
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
// When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element through the `src` property.
// This is using the built-in support of the plain video element, without using hls.js.
// Note: it would be more normal to wait on the 'canplay' event below however on Safari (where you are most likely to find built-in HLS support) the video.src URL must be on the user-driven
// white-list before a 'canplay' event will be emitted; the last video event that can be reliably listened-for when the URL is not on the white-list is 'loadedmetadata'.
});
}
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
// When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element through the `src` property.
// This is using the built-in support of the plain video element, without using hls.js.
// Note: it would be more normal to wait on the 'canplay' event below however on Safari (where you are most likely to find built-in HLS support) the video.src URL must be on the user-driven
// white-list before a 'canplay' event will be emitted; the last video event that can be reliably listened-for when the URL is not on the white-list is 'loadedmetadata'.
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = 'https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8';
video.addEventListener('loadedmetadata',function() {
Expand Down Expand Up @@ -216,9 +216,9 @@ All HLS resources must be delivered with [CORS headers](https://developer.mozill
- Adaptive streaming
- Manual & Auto Quality Switching
- 3 Quality Switching modes are available (controllable through API means)
- Instant switching (immediate quality switch at current video position)
- Smooth switching (quality switch for next loaded fragment)
- Bandwidth conservative switching (quality switch change for next loaded fragment, without flushing the buffer)
- Instant switching (immediate quality switch at current video position)
- Smooth switching (quality switch for next loaded fragment)
- Bandwidth conservative switching (quality switch change for next loaded fragment, without flushing the buffer)
- In Auto-Quality mode, emergency switch down in case bandwidth is suddenly dropping to minimize buffering.
- Accurate Seeking on VoD & Live (not limited to fragment or keyframe boundary)
- Ability to seek in buffer and back buffer without redownloading segments
Expand All @@ -241,13 +241,16 @@ All HLS resources must be delivered with [CORS headers](https://developer.mozill
- `#EXT-X-ENDLIST` (Live playlist)
- `#EXT-X-MEDIA-SEQUENCE`
- `#EXT-X-TARGETDURATION`
- `#EXT-X-CONTINUITY`
- `#EXT-X-DISCONTINUITY`
- `#EXT-X-DISCONTINUITY-SEQUENCE`
- `#EXT-X-BYTERANGE`
- `#EXT-X-MAP`
- `#EXT-X-KEY` (https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4)
- `#EXT-X-PROGRAM-DATE-TIME` (https://tools.ietf.org/html/draft-pantos-http-live-streaming-18#section-4.3.2.6)
- `EXT-X-START:TIME-OFFSET=x` (https://tools.ietf.org/html/draft-pantos-http-live-streaming-18#section-4.3.5.2)
- `#EXT-X-PREFETCH`
- `#EXT-X-PREFETCH-DISCONTINUITY`

## License

Expand Down
4 changes: 2 additions & 2 deletions demo/basic-usage.html
Expand Up @@ -20,9 +20,9 @@ <h1>Hls.js demo - basic usage</h1>
});
hls.loadSource('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
hls.on(Hls.Events.MANIFEST_PARSED, function() {
video.play();
});
});
}
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
// When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element throught the `src` property.
Expand Down

0 comments on commit 466d98e

Please sign in to comment.