Commit Graph

28 Commits

Author SHA1 Message Date
Álvaro Velad Galván 3c91c16a97 feat: Temporarily increase of segmentPrefetchLimit at high playback rates (#9231) 2025-10-17 11:18:21 +02:00
Álvaro Velad Galván f5fa1da3d7 fix: Avoid download init segments again when not necessary (#9042)
We evict SegmentPrefetched on each streaming engine update, in the case
of Live, it may happen that we are on the Live edge and do not have
segments, but we want to avoid the initialization segment being
downloaded again in the future when it is not necessary.
2025-09-04 09:19:31 +02:00
Álvaro Velad Galván a7cb0052a6 feat(DASH): Change from L3D to non-L3D after the successful playback (#8876)
fastSwitching can be used in case there is a need to start linear
playback at very low delay (e.g. shortly after the time the client
acquired MPD, initialization segments, and DRM license) or to switch
from ad content to main content at an arbitrary point in the stream.

As an example, two representations, join6_540p and join6_1080p, have
6-frame GOPs and are used to start playback at a 6-frame boundary. This
enables start-up and fine-grain random access at any 6-frame boundary.

fastSwitching are aligned with the “normal” adaptation set. Asa result,
it it is possible to switch between “normal” and fastSwitching variant
at any segment sequence boundary.

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-07-16 17:45:05 +02:00
Álvaro Velad Galván aed6471dd4 perf(HLS): Reduce load time when loading in the player a media playlist (#8333)
This allows temporary caching of init segment and data segment used to
obtain the data (eg: codec) needed for playback.
2025-03-25 18:00:47 +01:00
Wojciech Tyczyński 6e55a3b21b build: Forbid using dot in generic types (#7904)
Fixes #2643

Happy reviewing!
2025-01-20 09:39:51 +01:00
Wojciech Tyczyński 82f7eafdc5 build: Add new JSDoc rules to ESLint (#7897)
Adds a replacement for removed JSDoc checks from ESLint v9.
Additionally fixes lots of issues found in the JSDoc, such as:
- missing `@param`/`@return` annotations
- bad formatting
- params order
- param name in the same line as type definition (tried to disable it,
but it was causing other issues and we didn't have lots of places with
such formatting)

Minor fixes in code found by Closure Compiler after fixing JSDoc are
also included.
2025-01-17 09:28:19 +01:00
Wojciech Tyczyński 51765e9693 build: Change spellchecking tool and fix spelling mistakes (#7765)
Fixes #7693
2024-12-20 12:27:05 +01:00
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