hls.js 1.5.8-0.canary.10155 → 1.5.8-0.canary.10157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hls.js +16 -12
- package/dist/hls.js.d.ts +1 -1
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +14 -10
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +14 -10
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +16 -12
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/audio-track-controller.ts +5 -1
- package/src/controller/base-playlist-controller.ts +4 -6
- package/src/controller/level-controller.ts +5 -1
- package/src/controller/subtitle-track-controller.ts +5 -1
- package/src/types/level.ts +7 -4
package/src/types/level.ts
CHANGED
@@ -59,10 +59,13 @@ export const enum HlsSkip {
|
|
59
59
|
v2 = 'v2',
|
60
60
|
}
|
61
61
|
|
62
|
-
export function getSkipValue(details: LevelDetails
|
63
|
-
const { canSkipUntil, canSkipDateRanges,
|
64
|
-
|
65
|
-
|
62
|
+
export function getSkipValue(details: LevelDetails): HlsSkip {
|
63
|
+
const { canSkipUntil, canSkipDateRanges, age } = details;
|
64
|
+
// A Client SHOULD NOT request a Playlist Delta Update unless it already
|
65
|
+
// has a version of the Playlist that is no older than one-half of the Skip Boundary.
|
66
|
+
// @see: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.3.7
|
67
|
+
const playlistRecentEnough = age < canSkipUntil / 2;
|
68
|
+
if (canSkipUntil && playlistRecentEnough) {
|
66
69
|
if (canSkipDateRanges) {
|
67
70
|
return HlsSkip.v2;
|
68
71
|
}
|