Skip to content

Commit 770b0ae

Browse files
yajin2021tjenkinsonrenovate[bot]hlsjs-ciluwes
authored
Patch/v1.4.4 doris (#82)
* reference v1 jsdelivr url in v1 api doc people should be using that over latest so that things don't break when we release v2 with potentially breaking changes. Main readme already used v1 url * chore(deps): update dependency @rollup/plugin-alias to v4.0.4 * chore(deps): update dependency @microsoft/api-documenter to v7.21.7 * chore(deps): update dependency @rollup/plugin-typescript to v11.1.0 * chore(deps): update dependency @rollup/plugin-node-resolve to v15.0.2 * chore(deps): update dependency wrangler to v2.15.0 * chore(deps): update dependency @rollup/plugin-alias to v5 * Fix readme logos & add Mux logo (video-dev#5390) * docs: replace broken logo with Mux * docs: fix TED logo * docs: replace broken logos * chore(deps): update dependency lint-staged to v13.2.1 * chore(deps): update dependency typescript to v5.0.4 * chore(deps): update dependency eslint to v8.38.0 * chore(deps): update dependency es-check to v7.1.1 * chore(deps): update dependency @rollup/plugin-terser to v0.4.1 * chore(deps): update typescript-eslint monorepo to v5.58.0 * chore(deps): update dependency semver to v7.4.0 * chore(deps): update dependency @rollup/plugin-commonjs to v24.1.0 * chore(deps): update dependency semver to v7.5.0 * chore(deps): update typescript-eslint monorepo to v5.59.0 * Setup npm provenance statements (video-dev#5406) * give publish job permissions for npm provenance * add `—provenance` flag to `npm publish` * remove unneeded `contents` permission * chore(deps): update dependency chromedriver to v112 (video-dev#5393) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tom Jenkinson <[email protected]> * set `internalChecksAsSuccess` renovate option * chore(deps): update dependency wrangler to v2.15.1 * set renovate `prNotPendingHours` to 0 * chore(deps): update dependency wrangler to v2.16.0 * chore(deps): update dependency rollup to v3.20.3 * chore(deps): update dependency rollup to v3.20.7 * chore(deps): update dependency rollup to v3.21.0 * chore(deps): update tjenkinson/gh-action-auto-merge-dependency-updates digest to 01b22a9 (video-dev#5324) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * tweak renovate options again see renovatebot/renovate#21720 * reset remainderData in resetContiguity (video-dev#5410) * docs: add Media Chrome for custom UI (video-dev#5391) * Perform playlist retries before redundant failover and level switch (video-dev#5420) (Pathway switch is still prioritized over retries when available) Fixes video-dev#5419 * chore(deps): update dependency sinon to v15.0.4 * chore(deps): update dependency karma-chrome-launcher to v3.2.0 * chore(deps): update dependency selenium-webdriver to v4.9.0 * Update audio-track-controller.ts (video-dev#5431) Sometimes STABLE-RENDITION_ID of tracks is undefined. Adding a guard for it, otherwise audio track doesn't switch. * chore(deps): update dependency eslint to v8.39.0 * chore(deps): update dependency karma to v6.4.2 * chore(deps): update dependency prettier to v2.8.8 * Fix incorrect HEVC main profile codec id (video-dev#5438) * fix: move `types` condition to the front (video-dev#5439) * chore(deps): update dependency wrangler to v2.17.0 * chore(deps): update typescript-eslint monorepo to v5.59.1 * chore(deps): update typescript-eslint monorepo to v5.59.2 * Fix Low-Latency part and fragment tracking (video-dev#5423) * Fix Low-Latency part and fragment tracking regression introduced in video-dev#5102 * Fix issues with reuse of player instance when loading additional assets Fixes video-dev#5425 * Reset SourceBuffers in `loadSource()` when the asset URL has changed, or buffer-controller setup has begun * Remove old parts from the fragment tracker on frag buffered * Remove old parts from the fragment tracker on frag buffered * Reset eme-controller key format promise on manifest loading * chore(deps): update dependency lint-staged to v13.2.2 * Always use MediaSource returned by utils module (video-dev#5448) * chore(deps): update dependency @microsoft/api-documenter to v7.22.0 * chore(deps): update dependency @microsoft/api-documenter to v7.22.4 * chore(deps): update babel monorepo to v7.21.5 * chore(deps): update dependency @microsoft/api-extractor to v7.34.5 * chore(deps): update dependency @babel/core to v7.21.8 * chore(deps): update dependency @microsoft/api-extractor to v7.34.6 * chore(deps): update dependency @microsoft/api-extractor to v7.34.8 * chore(deps): update dependency @types/chai to v4.3.5 * chore(deps): update dependency rollup to v3.21.1 * chore(deps): update dependency rollup to v3.21.5 * chore(deps): update dependency eventemitter3 to v5.0.1 * fix: partial audiovideo fragments not being treated as partial (video-dev#5460) Fragments which contain both audio and video also need to be checked if they are partial. We check for them individually, but there are cases when only the one flag is set. * Fix AV desync regression in v1.4.0 when mp4 audio track timestamps start before video track timestamps (video-dev#5471) Fixes video-dev#5452 * chore(deps): update dependency wrangler to v2.18.0 * chore(deps): update dependency chromedriver to v112.0.1 * chore(deps): update dependency wrangler to v2.20.0 * Allow live level loading to recover from net::ERR_NETWORK_IO_SUSPENDED errors (video-dev#5473) * Remove startLoad() as recovery method from API.md doc (video-dev#5478) video-dev#5476 * Fix first fragment ejection tracking (video-dev#5480) Fixes video-dev#5482 * Provide light ESM dist file (video-dev#5486) * Playlist loading errors are fatal after all levels and retries exhausted (video-dev#5498) Fixes video-dev#5488 * Adjust parsed TS AVC samples when start PTS overlaps with last DTS (video-dev#5500) Resolves video-dev#5477 * Fix TS probing false positives by requiring 2-3 packet start bytes to be matched or more if first byte does not match sync word (video-dev#5503) Fixes video-dev#5501 * Use input timescale when normalizing metadata cue timestamps (video-dev#5505) Fixes video-dev#5504 * chore: change package.json --------- Co-authored-by: Tom Jenkinson <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: hlsjs-ci <[email protected]> Co-authored-by: Wesley Luyten <[email protected]> Co-authored-by: Billy Chiu <[email protected]> Co-authored-by: Rob Walch <[email protected]> Co-authored-by: Agajan J <[email protected]> Co-authored-by: Sta Zhu <[email protected]> Co-authored-by: Mateusz Burzyński <[email protected]> Co-authored-by: Troy <[email protected]> Co-authored-by: Chocobozzz <[email protected]>
1 parent 3e9debd commit 770b0ae

File tree

11 files changed

+401
-819
lines changed

11 files changed

+401
-819
lines changed

build-config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,11 @@ const configs = Object.entries({
296296
format: FORMAT.umd,
297297
minified: true,
298298
}),
299+
lightEsm: buildRollupConfig({
300+
type: BUILD_TYPE.light,
301+
format: FORMAT.esm,
302+
minified: false,
303+
}),
299304
worker: {
300305
input: './src/demux/transmuxer-worker.ts',
301306
onwarn: (e) => {

docs/API.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ See [API Reference](https://hlsjs-dev.video-dev.org/api-docs/) for a complete li
1212
- [Fourth step: control through `<video>` element](#fourth-step-control-through-video-element)
1313
- [Fifth step: error handling](#fifth-step-error-handling)
1414
- [Fatal Error Recovery](#fatal-error-recovery)
15-
- [`hls.startLoad()`](#hlsstartload)
1615
- [`hls.recoverMediaError()`](#hlsrecovermediaerror)
1716
- [Error recovery sample code](#error-recovery-sample-code)
1817
- [`hls.swapAudioCodec()`](#hlsswapaudiocodec)
@@ -258,17 +257,19 @@ video.play();
258257

259258
All errors are signalled through a unique single event.
260259

261-
Each error is categorized by:
260+
Each error is categorized by an error type, error details, and whether or not is is `fatal`:
262261

263-
- its type:
262+
- Error Types:
264263
- `Hls.ErrorTypes.NETWORK_ERROR` for network related errors
265264
- `Hls.ErrorTypes.MEDIA_ERROR` for media/video related errors
265+
- `Hls.ErrorTypes.KEY_SYSTEM_ERROR` for EME related errors
266+
- `Hls.ErrorTypes.MUX_ERROR` for demuxing/remuxing related errors
266267
- `Hls.ErrorTypes.OTHER_ERROR` for all other errors
267-
- its details:
268+
- Error Details:
268269
- refer to [Errors details](#Errors)
269-
- its fatality:
270-
- `false` if error is not fatal, hls.js will try to recover it
271-
- `true` if error is fatal, an action is required to (try to) recover it.
270+
- Error is `fatal`:
271+
- `false` if error is not fatal, hls.js will try to recover.
272+
- `true` if error is fatal, all attempts to recover have been performed. See [LoadPolicies](#fragloadpolicy--keyloadpolicy--certloadpolicy--playlistloadpolicy--manifestloadpolicy--steeringmanifestloadpolicy) details on how to configure retries.
272273

273274
Full details are described [below](#Errors)
274275

@@ -292,11 +293,7 @@ hls.on(Hls.Events.ERROR, function (event, data) {
292293

293294
#### Fatal Error Recovery
294295

295-
hls.js provides means to 'try to' recover fatal network and media errors, through these 2 methods:
296-
297-
##### `hls.startLoad()`
298-
299-
Should be invoked to recover network error.
296+
hls.js provides means to 'try to' recover fatal media errors, through these methods:
300297

301298
##### `hls.recoverMediaError()`
302299

@@ -308,15 +305,17 @@ Should be invoked to recover media error.
308305
hls.on(Hls.Events.ERROR, function (event, data) {
309306
if (data.fatal) {
310307
switch (data.type) {
311-
case Hls.ErrorTypes.NETWORK_ERROR:
312-
// try to recover network error
313-
console.log('fatal network error encountered, try to recover');
314-
hls.startLoad();
315-
break;
316308
case Hls.ErrorTypes.MEDIA_ERROR:
317309
console.log('fatal media error encountered, try to recover');
318310
hls.recoverMediaError();
319311
break;
312+
case Hls.ErrorTypes.NETWORK_ERROR:
313+
console.error('fatal network error encountered', data);
314+
// All retries and media options have been exhausted.
315+
// Immediately trying to restart loading could cause loop loading.
316+
// Consider modifying loading policies to best fit your asset and network
317+
// conditions (manifestLoadPolicy, playlistLoadPolicy, fragLoadPolicy).
318+
break;
320319
default:
321320
// cannot recover
322321
hls.destroy();
@@ -1639,13 +1638,13 @@ Static getter: return hls.js dist version number.
16391638
16401639
## Network Loading Control API
16411640
1642-
By default, hls.js will automatically start loading quality level playlists, and fragments after `Hls.Events.MANIFEST_PARSED` event has been triggered (and video element has been attached).
1641+
By default, hls.js will automatically start loading quality level playlists, and fragments after `Hls.Events.MANIFEST_PARSED` event has been triggered.
16431642
1644-
However if `config.autoStartLoad` is set to `false`, the following method needs to be called to manually start playlist and fragments loading:
1643+
However, if `config.autoStartLoad` is set to `false`, then `hls.startLoad()` needs to be called to manually start playlist and fragments loading.
16451644
16461645
### `hls.startLoad(startPosition=-1)`
16471646
1648-
Start/restart playlist/fragment loading. this is only effective if MANIFEST_PARSED event has been triggered and video element has been attached to hls object.
1647+
Start/restart playlist/fragment loading. this is only effective if MANIFEST_PARSED event has been triggered.
16491648
16501649
startPosition is the initial position in the playlist.
16511650
If startPosition is not set to -1, it allows to override default startPosition to the one you want (it will bypass hls.config.liveSync\* config params for Live for example, so that user can start playback from whatever position)

0 commit comments

Comments
 (0)