Needed for #5022
This PR does not enable AirPlay on MSE yet, but moves shaka from using
`src` attribute to `source` tags. With this change we will be able to
enable it more easily, as `src` and `source` should not be used
together.
Recent tests have shown that although `SourceBuffer.changeType()` exists on PS5, calling it when switching between AAC and EC3 always throws an exception. Disable smooth codec switch on that platform together with PS4.
This reverts commit a32043864a.
MetaSegmentIndex may be closed during an async operation and we must
take this into account.
BEGIN_COMMIT_OVERRIDE
chore: Ignore this in the changelog; it was reverted
END_COMMIT_OVERRIDE
It should always be MetaSegmentIndex, so handle it via assertion instead
of an `if()`. This way we will satisfy compiler, avoid unnecessary
`if()` check and potentially find errors quicker thanks to assertion.
Since xlink processing is slow and very few streams use it, it is best
to disable this functionality by default to improve performance
especially on STB or SmartTV devices.
Related to #7148
Does not create parent elements anymore to reduce memory consumption.
Starts to use `createElementNS()` so created elements will keep proper
cases for tag names and they won't be anymore of type `HTMLElement`, but
`Element`, which should be more lightweight and suitable for our needs.
`AbortController` polyfill attaches to the global object and it messes up with feature detection for projects that are using shaka. As it is not able to properly abort ongoing requests, it doesn't give much value.
If any segment gets evicted in live scenario, `segmentIndex.get(0)` will return `null`. Due to that, image tracks have `tilesLayout` set to `null` if we call `player.getImageTracks()` after segments have been evicted.
Additionally to main fix, I've replaced all other appearances of `segmentIndex.get(0)` with `segmentIndex.earliestReference()` to prevent similar bugs.
On Xbox One, Media Source claims it's not able to play Dolby Vision codecs. However, when it's created using their AVC/HEVC equivalent, it plays fine DV content.
By limiting progress events to only ones with minimal chunk size, we might end up with feeding better default ABR implementation, which should result in more accurate adaptation in case of network throttle.
When roles exist and are equal between tracks and periods, period
combiner matches based on that instead of looking for other
similarities. This PR addresses it & adds regression test.
Previously, we added a 1 second "cooldown" period between attempts to
perform a corrective seek.
This was for the benefit of old v1 Chromecasts, which found the process
of seeking so slow that they would sometimes get stuck in an infinite
loop trying to start a presentation.
However, that cooldown period was causing issues in some situations
during seeking, so this PR removes the restriction on everything but
pre-Android Chromecast devices.
Fixes#4393Fixes#5202
---------
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>