Commit Graph

189 Commits

Author SHA1 Message Date
Roger Pales b3cacadd16 fix(DASH): Firefox multi-period/multi-codec bug (#6691)
Fixes #6690
2024-05-29 11:45:47 +02:00
Wojciech Tyczyński e0eeb5b77d feat: add config to clear decodingInfo cache on unload (#6678)
On PlayStation, cached `MediaKeySystemAccess` objects may corrupt after
several playbacks, and they are not able anymore to properly create
`MediaKeys` objects. To prevent it, clear the cache after each playback.
Make it configurable via `streaming.clearDecodingCache`.
2024-05-27 14:10:33 +02:00
Álvaro Velad Galván 329d42ad56 feat: Parse colorGamut and use it in MCap (#6663) 2024-05-24 08:59:06 +02:00
Álvaro Velad Galván 0a4c9d1973 fix: Fix Opus support in Safari (#6607)
In Safari:

```
> MediaSource.isTypeSupported('audio/mp4;codecs=Opus')
< true
> MediaSource.isTypeSupported('audio/mp4;codecs=opus')
< false
> MediaSource.isTypeSupported('audio/webm; codecs="Opus"')
< false
> MediaSource.isTypeSupported('audio/webm; codecs="opus"')
< true
```
2024-05-14 17:46:39 +02:00
Álvaro Velad Galván 0206e5af8e feat: Add a new setting to allow remove based on channels count (#6600)
Close https://github.com/shaka-project/shaka-player/issues/6491
2024-05-14 10:28:06 +02:00
Joey Parrish 5da5de2800 feat: Expose the maximum hardware resolution through probeSupport() (#6569)
This makes it easier to debug hardware resolution issues through the
support page, which can now show hardware resolution. To show the
support page on Chromecast devices, use chromecast-webdriver-cli.
2024-05-09 10:43:37 -07:00
Álvaro Velad Galván ec29f82592 feat: Check encryptionScheme against MCap (#6484)
Closes https://github.com/shaka-project/shaka-player/issues/1419
2024-05-08 11:10:56 +02:00
Álvaro Velad Galván 0e00d6551f fix: Fix flac detection in Safari (#6497) 2024-04-29 11:54:52 -07:00
Wojciech Tyczyński c9b61fe351 perf(DRM): pass preferredKeySystems to filterManifest() (#6468)
Follow up to #5391
Always use `preferredKeySystems` during manifest filtering, not only via
DRM Engine.
2024-04-23 14:27:36 -07:00
Álvaro Velad Galván 35dd5433ed fix(HLS): Fix labelling of captions in Safari (#6426)
Fixes https://github.com/shaka-project/shaka-player/issues/6233
2024-04-10 12:18:36 +02:00
theodab 1da5da9790 fix(DASH): Fix support for multi-mimeType variants (#6348)
A previous PR, #5950, added support for variants that contain multiple
different codecs.
It was supposed to also add support for variants with multiple
mimeTypes, but that part didn't work correctly. This reworks a lot of
#5950 and #6047, to change how they handle such complicated variants.

This has the side-effect of allowing the stream utils to differentiate
between content that has multiple codecs because of type changes, and
content that has multiple codecs because of being muxed video+audio.

Fixes #6010

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-04-10 02:48:57 -07:00
Justin Swaney bb712c0283 fix: Fix detection of flac support on Safari (#6250)
When constructing the MediaDecodingConfigurations to query media capabilities in `stream_utils.js`, the spelling of "fLaC" should not change to "flac" on Safari. This is because on Safari the query will return `supported: false` for "flac" but `supported: true` for "fLaC".

This change allows manifests with "fLaC" codecs to work properly on Safari when using MSE / Managed Media Source.

Fixes #6249
2024-02-15 17:17:07 -08:00
Álvaro Velad Galván 278c7bc8cf feat: Detect maximum HW resolution automatically on some platforms (#6180) 2024-02-01 19:47:53 +01:00
Mathieu Côté 08cc34a532 fix: AC-3 audio codec support on Tizen (#6166)
Fixes https://github.com/shaka-project/shaka-player/issues/6160
2024-01-26 15:29:25 +01:00
Álvaro Velad Galván 07ebdb1d2c fix: player Dropping Variant (better codec available) when it should not (#6163)
Fixes https://github.com/shaka-project/shaka-player/issues/6162
2024-01-25 18:41:08 +01:00
Álvaro Velad Galván e692d68ecf fix: Reject Opus encrypted on Firefox Android (#6115)
Fixes https://github.com/shaka-project/shaka-player/issues/6111
2024-01-18 08:10:34 +01:00
theodab 24e32559bf feat(DASH): Handle mixed-codec variants. (#5950)
With the addition of the changeType API for MediaSource, it is theoretically possible for a variant to change between multiple codecs for a given buffer, over the course of playback.
This adds support for the DASH player to stitch together periods which have such multi-codec variants, but only as a last resort. For example, if one period only has audio in aac, and another period only has opus audio, the player will now stitch those periods together as one, but if there is a throughline that does not involve changing codecs it will go for that instead.

Closes #5961
2023-12-01 00:37:32 -08:00
Álvaro Velad Galván c830a99041 fix: Fix selectAudioLanguage using channelsCount param (#5875) 2023-11-13 09:10:32 +01:00
Álvaro Velad Galván d6aab6befa fix: Fix missing audio streams (#5869)
Fixes https://github.com/shaka-project/shaka-player/issues/5858
2023-11-13 09:10:12 +01:00
Álvaro Velad Galván 801131f84c feat(HLS): Add support for mjpg I-Frames playlist (#5856)
It also adds support for rendering downloaded thumbnails.
2023-11-08 03:29:09 +01:00
Álvaro Velad Galván 51edeaefa0 fix: Fix variant filtering by preferredAudioChannelCount (#5859)
Fixes https://github.com/shaka-project/shaka-player/issues/5858
2023-11-06 11:49:20 +01:00
Álvaro Velad Galván 508e5cfbba feat(DASH): Add initial support for "urn:mpeg:dash:ssr:2023" (#5762) 2023-11-03 14:57:15 +01:00
Álvaro Velad Galván 5aa3597074 fix: Fix incompatible codec is selected in Windows Edge for Widevine (#5831)
Fixes https://github.com/shaka-project/shaka-player/issues/4242
2023-10-30 16:23:13 +01:00
Álvaro Velad Galván 8ff204d49d fix: Fix chooseCodecsAndFilterManifest for similar frameRate (#5817) 2023-10-27 09:08:07 +02:00
Álvaro Velad Galván 81fc82b6b2 feat(HLS): Add support for REQ-VIDEO-LAYOUT (#5809)
Also add preferredVideoLayout config
2023-10-26 09:25:45 +02:00
Álvaro Velad Galván 51870e9d7c fix: Fix chooseCodecsAndFilterManifest for some HLS manifest (#5800) 2023-10-24 18:16:08 +02:00
Ivan 170a40c308 perf(Xbox): drop incompatible variants for XBOX early (#5777)
This change:

- drops incompatible variants for XBOX before parsing codes and checking them against media capabilities API
- avoids redeclaring variables each time in the loop

Co-authored-by: Ivan Kohut <ivan.kohut@lamin.ar>
2023-10-18 13:04:38 -07:00
Dave Nicholas 0078137d1b feat: Enable codec switching (#5470)
Closes: https://github.com/shaka-project/shaka-player/issues/1528
Closes: https://github.com/shaka-project/shaka-player/issues/1567
Closes: https://github.com/shaka-project/shaka-player/issues/4379
Closes: https://github.com/shaka-project/shaka-player/issues/5306

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2023-10-04 08:37:14 +02:00
Wojciech Tyczyński d021d6f932 fix: fix preferred track selection on Safari (#5601)
Preferred track selection was implemented differently for MSE and native
playback. In fact, native playback even had different implementations
for audio and text. It leads to inconsistencies during track selection,
i.e. if track language contains locale, but language preference not, on
MSE we're looking for closest locale and on src= we're making direct
string comparison which leads to different results.
To unify that, both MSE and native will now use
`StreamUtils.filterStreamsByLanguageAndRole()` to find matching track.
This method is designed to use on `shaka.extern.Stream` but luckily it
uses the very same fields as defined in `shaka.extern.Track` so we can
use it without major changes.
Moreover, using this more robust method also allows us to get rid of
double-selection workaround used so far. Observe that we were first
selecting track without preferred role and then with preferred role.
2023-09-05 08:24:49 -07:00
Wojciech Tyczyński 8cd3e2dd26 fix: Default language to 'und' for native tracks (#5464)
Set default language to `und` for native audio/text tracks if missing.
2023-08-15 17:49:04 +02:00
Wojciech Tyczyński 4f1a1196a9 fix: add MIME type for HTML5 tracks (#5452) 2023-08-15 17:38:30 +02:00
lonebyte ccc3d2fb71 fix: Support fLaC and Opus codec strings in HLS (#5454)
Fixes: #5453
2023-08-15 17:35:05 +02:00
Wojciech Tyczyński f53349fc93 feat: Add originalLanguage to the Track structure (#5409)
Shaka in most of places normalizes tracks' language code to be compliant with ISO 639-1 when possible. However, it does not do that all the time (i.e. normalization is missing in MSS parser) and there is no way to get value that has been explicitly set in a manifest. Moreover, documentation is misleading, as it claims that value is taken directly from a manifest.
Normalization should take place, specifically to easify PeriodCombiner algorithm and also to not break existing applications.
However, original value can be desired for some implementations.
This PR introduces new field to get original language value from the manifest.
2023-07-18 02:09:17 -07:00
Wojciech Tyczyński 6d75d89fbb feat(DRM): use preferredKeySystems to reduce requestMediaKeySystemAccess() calls (#5391)
Propagate `preferredKeySystems` config to `getDecodingInfosForVariants()` method.
By doing that, shaka can only ask for `MediaKeySystemAccess` objects that will be used during playback.

If any preferred key system is available, player will stop requesting for MKSA.
If none of preferred key systems is available, player will try to get MKSA for any existing configuration, as usual.
2023-07-08 04:36:32 -07:00
theodab 2f511a2930 feat: Add preferredVideoHdrLevel config. (#5370)
This configuration value allows the manifest variants to be filtered based on the HDR level of their video stream.
By default this is set to an auto-detect setting, which chooses PQ or SDR based on the device's detected capabilities.
2023-06-29 03:16:31 -07:00
Álvaro Velad Galván 1ad75ec8b7 fix: Populate HDR correctly (#5369) 2023-06-29 09:45:01 +02:00
theodab 654a0281d9 feat(DASH): Expose accessibility purpose in track (#5216)
Closes #5211
2023-05-08 17:13:06 -07:00
/zɒ̃ge/ fdc5cb165d fix: Fix temporarily disable streams on network error (#5057)
Relates to #4189
Fixes #5054 
Fixes #5055
Fixes #5150
2023-04-18 19:22:00 +02:00
Fernando Neira 3543e579c5 feat(utils): Export shaka.util.StreamUtils.meetsRestrictions (#5100)
Closes https://github.com/shaka-project/shaka-player/issues/5098
2023-03-17 22:15:08 +01:00
Álvaro Velad Galván 62eea57660 chore: Fix typos in logs (#5097) 2023-03-16 13:09:02 +01:00
Álvaro Velad Galván 7439a264d6 fix(MCap): Remove robustness when robustness value is default (#4953)
Fixes https://github.com/shaka-project/shaka-player/issues/4659
2023-01-31 18:21:28 +01:00
YuChao Liang e351395c4a fix: Fix legacy codec support by rewriting codec metadata (#4858)
This fixes legacy codec support by rewriting the codec metadata in the
Stream objects. After capability checking, the converted codec
information will be used.

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2023-01-05 13:41:11 -08:00
theodab 806a9a81c4 fix: Manually order key for decodingInfo cache (#4795) 2022-12-07 11:39:11 -08:00
Zhenghang Chen ad6c08561d perf: Caching mediaSource support for browser engine (#4778)
Caches the results of MediaSource.isTypeSupported, which is slow on some platforms, to reduce the
number of calls needed. This is especially helpful on manifests with many similar variants (multiple languages, etc).
Data collected from 2 months of practical testing shows that this helps reduce the start lag by 40% on Chromecast, 15% on WebOS, and 12% on Tizen.
2022-12-05 19:47:13 -08:00
theodab b7781f0446 feat: Cache mediaCapabilities.decodingInfo results (#4789)
Issue #4775
2022-12-05 18:12:21 -08:00
Álvaro Velad Galván c3ff8e5e5f fix(HLS): Fix support legacy AVC1 codec used in HLS (#4716) 2022-11-18 16:33:06 -08:00
Dave Nicholas 884c4ca4f8 feat: Caching and other efficiency improvements for mcap polyfill (#4708)
This PR caches the result of `requestMediaKeySystemAccess` saving time
on subsequent calls.

It also makes the calls to `decodingInfo` synchronous. The reason for
this, is the result of testing on multiple devices that the behaviour of
`requestMediaKeySystemAccess` appears to be synchronous, making this
synchronous can save over a second on older TVs.

Closes #4574
2022-11-18 09:34:33 -08:00
Álvaro Velad Galván 8475214bc4 fix: Filter unsupported H.264 streams in Xbox (#4493) 2022-09-19 19:59:50 +02:00
Joey Parrish b6ab769762 fix: Fix VP9 codec checks on Mac Firefox (#4391)
Tests for VP9 codec checks were failing on Firefox on our M1 Mac.  This
addresses the issue by changing some default values that get used in a testing
environment, and another default value that is used in production.
2022-08-09 08:26:40 +02:00
Casey Occhialini 713f461c62 fix: Populate track's spatialAudio property (#4291)
Fixes issue #4290 where `spatialAudio` flag is not being set on variant tracks.

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2022-06-13 16:19:48 -07:00