-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Implement support for LL-HLS #EXT-X-PRELOAD-HINT part loading #6356
base: master
Are you sure you want to change the base?
Conversation
I started to clean up the fragment-preloader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to mark this for milestone v1.6.0 if others using HLS.js for Low-Latency HLS would preview this branch and let us know what kind or results they get compared to latest. Branch preview URL: https://feature-preload-hint.hls-js-4zn.pages.dev/
I can see us using FragmentPreloader to tackle byte-range addressing (#5767 chunked-transfer interop) in the future. Thanks for laying the ground work!
@@ -349,6 +353,14 @@ export default class BaseStreamController | |||
this.initPTS = []; | |||
} | |||
|
|||
protected cachePreloadHint(details: LevelDetails): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be made private if not accessed by either sub-class (stream-controller or audio/subtitle).
src/loader/fragment.ts
Outdated
@@ -284,6 +285,7 @@ export class Part extends BaseSegment { | |||
baseurl: string, | |||
index: number, | |||
previous?: Part, | |||
isPreload?: boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this argument is ever used. If we only set it on mergeFragData
then we shouldn't add it to the constructor.
src/controller/abr-controller.ts
Outdated
frag.type === PlaylistLevelType.MAIN && | ||
!(part?.isPreload || frag.isPreload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamboorrito what do you think about moving isPreload to stats? Or since Preload Hints only apply to parts, only on the Part
subclass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be any value to adding round trip time (header response) and using that in place of first body byte when dealing with blocking requests? The distinction we may want to make for stats
is that this was a request where we expected the server to block until the response is available (could be on preload parts or playlists, but not on fragments via preload hints until #5767
is implemented).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try moving it to stats again, I had a problem where the stats.wasBlockingLoad property I added was removed before it got checked
: this.load(frag, noop); | ||
let loadPromise; | ||
if (part !== undefined) { | ||
// TODO: Use fetch loader to progressively load open-ended byterange requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc #5767
…w. Add skeleton for fetch loader support of these requests.
e0955a8
to
b3e230e
Compare
This PR will...
Add support for EXT-X-PRELOAD-HINT via state machine fragment-preloader.
Why is this Pull Request needed?
Reduce some latency for low latency mode by making preemptive requests.
Are there any points in the code the reviewer needs to double check?
Resolves issues:
To resolve #3988
Checklist