Commit Graph

226 Commits

Author SHA1 Message Date
Álvaro Velad Galván 53db6554f3 perf: Simplify getAudioTracks internally when using src= (#8703) 2025-06-06 09:34:14 +02:00
Wojciech Tyczyński 970d7756ea feat: Add Device API (#8210)
The goal is to simplify and abstract feature logic detection. Currently
lots of places depend on various calls to `shaka.util.Platform` and
mainteinance of this is hard & not easy to read.

By introducing device API ideally rest of the player logic would look
into device features instead of directly checking platform. Additionally
we can more easily cache needed values, so we won't have to parse user
agent several times anymore.

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2025-06-02 13:46:40 +02:00
Álvaro Velad Galván 2d8ad94690 feat: Simplify getStats to support MSE-AirPlay (#8309) 2025-03-21 11:53:31 +01:00
Álvaro Velad Galván 77a3f567bd feat: Add more info on src= tracks when the browser support it (#8302)
This add info about videoTrack when there is not audioTrack

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-03-20 12:09:10 +01:00
Álvaro Velad Galván 9021bd8272 feat: Add more info on src= tracks when the browser support it (#8299)
More info
https://github.com/WebKit/explainers/tree/main/TrackConfiguration
2025-03-19 20:21:59 +01:00
Álvaro Velad Galván d2f3657c96 feat: Simplicate Image/Thumbnails API (#8266) 2025-03-13 16:25:45 +01:00
Álvaro Velad Galván c0455d781f feat: Simplicate Text and Chapters APIs (#8264) 2025-03-13 12:20:49 +01:00
Álvaro Velad Galván 2d0995f58b fix: Fix codec selection (#8197)
Fixes ccbbb01e55 that broken codec
selection on
https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd
2025-03-03 14:55:51 +01:00
Álvaro Velad Galván 4e05551986 feat: Allow preload text tracks and expose the preloaded variant and text tracks (#8187) 2025-02-28 15:14:25 +01:00
Álvaro Velad Galván 6ffc30210e fix: Remove timeout for decodingInfo in some platforms and increase the timeout (#8172) 2025-02-26 15:37:27 +01:00
Álvaro Velad Galván 8f0b0e3282 feat(LCEVC): Detect as supported dual track content with LCEVC (#8134)
This PR does not yet add enhancement layer decoding support.
2025-02-21 13:28:56 +01:00
vlazh ccbbb01e55 fix: Check bandwidth when filtering streams (#8125)
Fixes #8124.
2025-02-20 17:29:03 +01:00
Álvaro Velad Galván 75709351c8 fix: Remove isSafari and always use isApple (#8104)
This replacement is safe to do and also reduces the number of internal
operations to obtain the result.
2025-02-19 10:07:35 +01:00
Álvaro Velad Galván f778713e13 feat: Create a new simple API for Audio (#8005)
Close https://github.com/shaka-project/shaka-player/issues/3544

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-02-05 12:16:25 +01:00
Álvaro Velad Galván 8e17bad40f fix: Add more info in getVariantTracks for muxed streams (#8002) 2025-02-03 14:11:14 +01:00
stefangehrer 4eb2ceab05 fix: Fix AC-3 playback on Tizen 3.0 devices (#7969)
Fixes https://github.com/shaka-project/shaka-player/issues/7955
2025-01-29 09:42:20 +01:00
Wojciech Tyczyński 16e66876c6 chore: Stop using "Object" in DV codecs mapping (#7946)
Related to #1672
2025-01-24 16:53:28 +01:00
Álvaro Velad Galván 148c4011e6 chore: Stop using "Object" in cache annotations (#7938)
Related to https://github.com/shaka-project/shaka-player/issues/1672
2025-01-24 11:36:56 +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
Álvaro Velad Galván bd996328a5 fix: Remove useless calls to isTypeSupported (#7817)
It also enables a test that has been disabled due to this bug.
2025-01-02 08:55:24 +01:00
Gary Katsevman 88472b3076 feat: add support for multiple robustness levels in drm (#7753)
This changes the `drm.advanced.videoRobustness` and `audioRobustness`
config options from a string to an array of strings. Internally, in the
drm engine, this gets expanded into an array of `DrmInfos` which have
those values as strings.

Best way to review this change is with whitespace turned off in the diff
options.

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2024-12-23 10:20:24 +01:00
Álvaro Velad Galván 179ccc61b8 chore: Move DrmEngine and DrmUtils to drm namespace (#7788) 2024-12-20 13:10:29 +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
Álvaro Velad Galván 60429e93f9 fix: Prefer Dolby Vision p5 over Dolby Vision p8 (#7745) 2024-12-11 14:10:50 +01:00
Álvaro Velad Galván 79a481e4ab fix: Fix usage of keySystemsMapping (#7736)
Related to https://github.com/shaka-project/shaka-player/issues/7613
2024-12-10 16:11:01 +01:00
Álvaro Velad Galván 656d16c7e0 perf: Reduce calls to isTypeSupported (#7729)
There should not be any call to isTypeSupported if we have already used
Mcap with the same codecs/mimeType
2024-12-09 13:29:38 +01:00
Joey Parrish 90e47eb58a fix: Avoid stack overflow when stringifying objects (#7721)
Add special case for arrays, for compatibility with frameworks or
polyfills that add properties to Array or Array instances.

Add special case for functions, which always contain circular references
and are unexpected in this context. These seem to appear because of the
frameworks/polyfills mentioned above.

Move everything to ObjectUtils, since this is extremely generic.

Closes #7435
2024-12-06 14:39:19 -08:00
Daniel Mariño 07894ecf14 fix: Timeout unfulfilled request to decodingInfo and requestMediaKeySystemAccess (#7682)
On some (Android) WebView environments,
decodingInfo and requestMediaKeySystemAccess will
not resolve or reject, at least if RESOURCE_PROTECTED_MEDIA_ID is not
set.
This is a workaround for that issue.

Closes #7680
2024-11-29 12:06:32 +01:00
Álvaro Velad Galván 597e129bd6 feat: Add preferredTextFormats config (#7523)
Close https://github.com/shaka-project/shaka-player/issues/4650
2024-10-31 08:53:55 +01:00
Álvaro Velad Galván 67859c987c feat(HLS): Add I-Frame playlist support (#7230) 2024-08-30 08:35:24 +02:00
Álvaro Velad Galván cdbbe232b1 fix: Fix support for Dolby Vision based in VVC (#7212)
Info from
https://dolby.my.salesforce.com/sfc/p/#700000009YuG/a/4u000000l6G4/4R18riPaaW3gxpVx7XwyQLdEITLFjB.w.Si0LoQR5j8
2024-08-26 22:53:14 +02:00
Álvaro Velad Galván 28523a3564 feat: Add video codec preference array at same resolution and bitrate (#7204) 2024-08-26 12:10:22 +02:00
Álvaro Velad Galván d63c44afba fix: Add more info in getVariantTracks for muxed streams (#7181) 2024-08-20 11:26:57 +02:00
Wojciech Tyczyński 388050cbd2 fix(HLS): Expose tilesLayout properly for live (#7123)
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.
2024-08-02 23:10:50 -07:00
Wojciech Tyczyński 2c399e0f9f fix(Xbox): Override Dolby Vision codecs (#7115)
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.
2024-08-01 18:45:29 -07:00
Álvaro Velad Galván c62c5b5131 fix: Only check encryptionScheme when is not null and not empty string (#7079)
Fixes https://github.com/shaka-project/shaka-player/issues/7057
2024-07-20 07:23:55 +02:00
Álvaro Velad Galván 64430edb23 fix(HLS): Fix filtering video/audio streams without bandwidth (#7008)
Fixes https://github.com/shaka-project/shaka-player/issues/7007
2024-07-10 09:14:25 +02:00
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