Skip to content
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

feat(preload): Wait for prefetches when preloading #7533

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

theodab
Copy link
Contributor

@theodab theodab commented Nov 3, 2024

Previously, the PreloadManager would consider a preload "finished" after a few major files like the manifest had been preloaded. It would start prefetching some segments, but wouldn't wait on it to notify the developer.
This PR changes the PreloadManager so that
PreloadManager.waitForFinish won't return until the prefetched segments have finished loading.
Because of that, this also better surfaces errors thrown during segment prefetching, when preloading.

Issue #7520

Previously, the PreloadManager would consider a preload "finished"
after a few major files like the manifest had been preloaded.
It would start prefetching some segments, but wouldn't wait on it
to notify the developer.
This PR changes the PreloadManager so that
PreloadManager.waitForFinish won't return until the prefetched
segments have finished loading.
Because of that, this also better surfaces errors thrown during
segment prefetching, when preloading.

Issue shaka-project#7520
@theodab theodab added type: bug Something isn't working correctly type: enhancement New feature or request labels Nov 3, 2024
@theodab theodab requested a review from avelad November 3, 2024 09:27
lib/media/segment_prefetch.js Outdated Show resolved Hide resolved
@shaka-bot
Copy link
Collaborator

Incremental code coverage: 80.65%

@avelad
Copy link
Member

avelad commented Nov 4, 2024

@theodab some tests are failing, can you review it? Thanks!

@theodab theodab merged commit 2ad1eff into shaka-project:main Nov 5, 2024
16 of 17 checks passed
@theodab theodab deleted the preloadImprovementBranch branch December 2, 2024 01:29
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jan 4, 2025
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants