Commit Graph

21 Commits

Author SHA1 Message Date
theodab 2ad1eff39e feat(preload): Wait for prefetches when preloading (#7533)
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
2024-11-05 04:13:02 -08:00
Álvaro Velad Galván d502e9b689 fix(MSS): Don't allow prefetch segments with self-generated data (#7485) 2024-10-24 09:30:09 +02:00
Álvaro Velad Galván 4abfc5ac82 fix(DASH): Allow play all time fastSwitching tracks (#7180) 2024-08-20 11:36:23 +02:00
Wojciech Tyczyński db679e0282 fix(Prefetch): Ensure prefetched segments are continuous (#6908)
Follow up to #6899
2024-06-25 14:05:31 +02:00
Wojciech Tyczyński b5f1ee9f49 fix(Prefetch): cache iterator to avoid precision issues (#6899)
Starts caching `SegmentIterator` in `SegmentPrefetch` to avoid creating
new one on every update. Previous behavior was more time-consuming &
could cause issues on platforms with precision problems, like Xbox.
2024-06-25 12:29:44 +02:00
Álvaro Velad Galván ce7cef4d00 fix: Fix init segment equality in Segment Prefetch (#6537) 2024-05-06 20:02:31 +02:00
Álvaro Velad Galván 2f5062a417 fix: Remove preloaded segment when segment has network error (#6515) 2024-04-30 11:37:11 +02:00
Álvaro Velad Galván 0fc5814c6a feat: Evict instead delete on prefetch (#6404)
This change gives better performance when playing low latency streams
2024-04-05 08:35:53 +02:00
theodab 489b11a959 feat: Add preload system to player (#5897)
Adds a new player method, preload. This asynchronous method creates a PreloadManager object, which
will preload data for the given manifest, and which can be passed to the load method (in place of an asset URI)
in order to apply that preloaded data. This will allow for lower load latency; if you can predict what asset will
be loaded ahead of time (say, by preloading things the user is hovering their mouse over in a menu),
you can load the manifest before the user presses the load button.
Note that PreloadManagers are only meant to be used by the player instance that created them.

Closes #880

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-02-02 00:27:29 -08:00
Álvaro Velad Galván b508d482c6 fix: Fix SegmentPrefetch in some cases (#6199) 2024-01-31 19:34:52 +01:00
Gary Katsevman a8ab0c824b feat: prefetch audio languages. (#6139)
Closes #6128
2024-01-29 08:35:17 +01:00
Álvaro Velad Galván 48626f2ae0 fix: Change quality only when adding the last partial segment and it is fast switching (#6114) 2024-01-18 08:31:06 +01:00
Gary Katsevman a70136d31d fix: log prefetch miss for missing segments (#6012)
A recent change made it always log that segments were re-used, but in
reality there were times when they were missed. Uses the language from
the original PR
2024-01-08 09:30:28 +01:00
Álvaro Velad Galván 3f392c00dc feat: Allow prefetch init segments (#5825) 2023-10-28 08:52:34 +02:00
Álvaro Velad Galván bab8153762 fix: Dispatch streamDataCallback correctly in SegmentPrefetchOperation (#5764)
Regression introduced at
https://github.com/shaka-project/shaka-player/pull/5310
2023-10-12 11:05:09 +02:00
Álvaro Velad Galván 7f8e051886 fix(HLS): Fix avoid prefetch missing segments (#5372) 2023-06-29 11:46:51 +02:00
Álvaro Velad Galván 9e6655a04a feat(HLS): Optimization of LL-HLS with byterange (#5319)
This solution is based on
https://www.akamai.com/blog/performance/-using-ll-hls-with-byte-range-addressing-to-achieve-interoperabi
2023-06-21 11:20:56 +02:00
Álvaro Velad Galván 6104b57a76 feat: Add support to streamDataCallback when using prefetch (#5310)
This change improve the latency in LL-DASH streams when using prefetch
2023-06-15 22:33:14 +02:00
Álvaro Velad Galván 4ed4f46f17 chore: Change prefetch log from info to debug (#5276) 2023-06-09 12:06:52 +02:00
Álvaro Velad Galván 551422a6f6 fix(HLS): Fix prefetch with LL-HLS stream (#5274) 2023-06-09 11:55:37 +02:00
Tian Shao de6abde06f feat: Support Parallel Segment Fetching (#4784)
closes https://github.com/shaka-project/shaka-player/issues/4658.

This solution is inspired by abandoned PR
https://github.com/shaka-project/shaka-player/pull/2809, which
implements segment prefetching ahead of current play head.


![image](https://user-images.githubusercontent.com/3315733/205465795-75c605d2-c2e3-4d03-90f5-46a72a7189d2.png)
2023-01-31 20:08:29 +01:00