Commit Graph

63 Commits

Author SHA1 Message Date
Wojciech Tyczyński 9e26166c40 fix: patch setServerCertificate() on older Tizens & webOS (#6696)
We've tried to enable setting server certificates to optimize playback
start, but turned out that with our widevine certificate shaka was
throwing 6004 error. The issue is not reproducible starting from Tizen
5.5. The same certificate was working properly also on Chrome.
2024-05-29 11:07:17 +02:00
Wojciech Tyczyński c541515995 fix: Ban smooth codec switching on Tizen 5 & 6 (#6686)
My recent tests on using smooth codec switch on Tizen 6.0 unfortunately
failed. Ban this platform together with Tizen 5.
2024-05-28 12:34:37 +02:00
Álvaro Velad Galván f1d620cb23 fix: Enable SMOOTH codec switching on Fuchsia cast devices (#6609) 2024-05-14 17:44:36 +02:00
Joey Parrish ddabe93eaf test: Fix Fuchsia background-video errors (#6579)
In some cases, Fuchsia Chromecast tests will fail with the error: "The
play() request was interrupted because video-only background media was
paused to save power."

This resolves the issue by ensuring tests run un-muted on that platform,
based on this Chrome code, which indicates the "paused to save power"
logic does not activate when sound is playing:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/media/web_media_player_impl.cc;l=3535;drc=d23075f3

This also fixes two places in our tests where the `createVideoElement()`
was bypassed. This should always be used, because it is a central place
to apply workarounds such as this.
2024-05-10 23:21:37 -07: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
Joey Parrish 4498dcde28 fix: Do not assume 1080p Cast devices, some are 720p (#6562) 2024-05-08 18:44:34 -07:00
Joey Parrish 9c1e621c7a test: Fix test environment access to cast.__platform__ (#6553)
This shim requires the latest version of the Chromecast WebDriver Server's receiver app, which can receive messages and proxy async access to `cast.__platform__`.
2024-05-08 14:15:09 -07:00
Álvaro Velad Galván 61ce88b2f5 fix: Issue with compiler minifying webOS device properties (#6558)
Fixes https://github.com/shaka-project/shaka-player/issues/6533

The original author is: @stuartflanagan 
The original PR is:
https://github.com/shaka-project/shaka-player/pull/6554
2024-05-08 16:09:49 +02:00
Wojciech Tyczyński ab26de4a60 test: Add error listener & ec3 test in codec switching integration test (#6486)
Adding EC-3 test case for codec switching integration suite, as some
platforms, i.e. Tizen 3 do not support Opus

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-05-06 16:40:55 +02:00
MichaelSweden f337e06bda fix: Handle non existing navigator.platform string (#6517) (#6518)
This fix will make it possible to use v4.8 in Cobalt browser. The
problem is that navigator.platform doesn't exist in Cobalt browser.

Fixes https://github.com/shaka-project/shaka-player/issues/6517

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-04-30 16:39:38 +02:00
Álvaro Velad Galván 95c6a7dda3 feat(UI): UI support for VR content (#6450)
Co-authored-by: Joey Parrish <joeyparrish@google.com>
2024-04-25 13:43:32 +02:00
Wojciech Tyczyński 8c549f3427 fix: Fix webOS 4 & 5 utility methods (#6463)
webOS platforms don't contain OS version explicitly in user agent,
instead they signal it via chrome version. This PR fixes webOS 4 & 5
methods and unifies all webOS check methods.
2024-04-22 10:46:46 +02:00
Álvaro Velad Galván fdc7c6c2eb fix: Disable smooth codec switching in Edge Windows (#6384)
Fixes https://github.com/shaka-project/shaka-player/issues/6353
2024-04-02 09:38:40 +02:00
Álvaro Velad Galván 278c7bc8cf feat: Detect maximum HW resolution automatically on some platforms (#6180) 2024-02-01 19:47:53 +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
Viktor Vasylkovskyi 7f5005db23 fix: APL set-top box wrongly identifies as an Apple device. (#6026) 2024-01-08 11:50:11 +01:00
Vasanthavanan Devarajan 3bf0664457 fix: ENCRYPTED CONTENT WITHOUT DRM INFO on comcast X1 due to safari blocklist (#6034) 2024-01-08 09:27:34 +01:00
Will Harris 9d23a87f85 fix: Add Orange platform to requiresEncryptionInfoInAllInitSegments (#5895)
Fixes: https://github.com/shaka-project/shaka-player/issues/5894.
2023-11-15 18:21:20 +01:00
Álvaro Velad Galván 01da5fa8a4 feat: Use ManagedMediaSource when available (#5683)
The spec can be seen at https://github.com/w3c/media-source/issues/320

Closes https://github.com/shaka-project/shaka-player/issues/5271
2023-10-11 11:22:17 +02: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
Álvaro Velad Galván 3c2c0955cb feat: Add H.265 TS transmuxer (#5611) 2023-09-15 08:01:53 +02:00
Will Harris 937484e0cb fix: Orange set top box is incorrectly categorized as Apple (#5545)
This PR adds an Orange platform check and excludes Orange from the
isApple() check.

Resolves: https://github.com/shaka-project/shaka-player/issues/5544

---------

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
2023-08-28 10:04:57 -07:00
Joey Parrish 3f5e804ff3 test: Fix playback test timeouts on Mac (#5504) 2023-08-18 14:27:44 -07:00
Álvaro Velad Galván 6f83997913 feat: Add AC3 transmuxer (#5297) 2023-06-24 12:59:21 +02:00
Álvaro Velad Galván 00d3a45dad feat: Add AAC transmuxer (#5240)
This transmuxer is used in Firefox due the lack of support for
`audio/aac`
2023-06-02 07:39:15 +02:00
Álvaro Velad Galván 6a48cfe64d fix: Fix MediaCapabilities polyfill on Hisense (#4927)
fixes https://github.com/shaka-project/shaka-player/issues/4925
2023-01-23 21:50:35 +01:00
Joey Parrish 30c2cb5ec5 test: Fix platform detection for Xbox (#4685)
Xbox One was being misdetected as Chrome, causing some mistakes in which
tests are skipped.

This does not appear to affect the library itself, since isChrome() and
chromeVersion() are only used in tests currently.
2022-11-10 12:27:51 -08:00
Agajan J df79470af0 fix: 4676 - Virgin Media set top box is incorrectly categorized as Apple/Safari (#4678)
In order to get the playback working, I am excluding VirginMedia device
from isApple() platform test, otherwise it incorrectly fails at
isBrowserSupported().

Fixes #4676

Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
2022-11-09 19:12:08 -08:00
Julian Domingo 65903aa27b fix: Resolve load failures for TS-based content on Android-based Cast devices (#4569). (#4570)
See https://github.com/shaka-project/shaka-player/issues/4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
2022-10-14 15:16:12 -07:00
Joey Parrish da87c39038 test: Update Chrome-Mac native screenshots (#4546)
Native text rendering has changed in Chrome 106 on Mac.
2022-10-05 08:44:08 -07:00
Subhan Ahmed 5102dac96c feat: add Amazon Fire TV platform support (#4375)
The `isBrowserSupported` function in the `utils/player.js` fails if the Safari Version is < 13. However, this check doesn't work for Amazon Fire TV devices. Even though they have a `Version/4.0` in the user agent string, the browser still supports all other requirements to support playback with Shaka Player. 

Here are a couple of examples of the different FireTV device user agents:

Fire TV Stick 4K - 1st Gen:
Mozilla/5.0 (Linux; Android 7.1.2; AFTMM Build/NS6289; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/100.0.4896.127 Mobile Safari/537.36

Fire TV Stick - 3rd Gen:
Mozilla/5.0 (Linux; Android 9; AFTSSS Build/PS7285.2877N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.92 Mobile Safari/537.36

The fix involves identifying the Amazon Fire TV device based on the parameters described [in the Amazon Fire TV docs](https://developer.amazon.com/docs/fire-tv/identify-amazon-fire-tv-devices.html) and disabling the Safari version check for these devices.
2022-07-28 13:26:45 -07:00
bcupac 0335b2af2e fix: Fix MediaCapabilities polyfill on Playstation 4 (#4320)
Add Playstation 5 detection to the Media Capabilities Polyfill install method.

Fixes #4320
2022-06-28 07:23:45 +02:00
Matthias 7c2c4be2ae fix: Fix EOS set-top box being identified as Apple. (#4310)
The EOS set-top box, built by Liberty Global, has WebKit embedded and should play MSE (+ EME) compatible streams. With the latest version (`4`), streams didn't play. When attaching a debugger to the box, I noticed that the srcEquals node is selected.

The EOS box identifies itself as an Apple device, which is wrong. `Platform.isApple()` returns true, therefore `shouldUseSrcEquals_` (in combination with `config_.streaming.useNativeHlsOnSafari`) returns true as-well. The native playback check is not holding it from selecting srcEquals (https://github.com/shaka-project/shaka-player/blob/main/lib/player.js#L1273) as EOS supports MPEG-DASH natively (but not in combination with DRM, as far as I know). Nonetheless, MSE is preferred.
2022-06-22 14:36:25 -07:00
Álvaro Velad Galván 11321d8f26 feat: only polyfill MCap for non Android-based Cast devices. (#4170)
Related to https://github.com/shaka-project/shaka-player/issues/4164#issuecomment-1110143441
2022-04-28 11:02:49 -07:00
Joey Parrish 1507b1e844 chore: Update URLs after moving projects (#4008) 2022-03-03 14:34:40 -08:00
Joey Parrish d99ab7959d build: Update eslint (#3977)
Also fixes linter errors found by the new versions
2022-02-18 08:26:43 -08:00
Álvaro Velad Galván 0daa00fc7f feat!(hls): HLS disabled in old browsers/platforms due to incompatibilities (#3964)
In Tizen 2/3 and WebOS 3.x there is no support for SourceBuffer.mode=sequence so as a result of change #2337, it necessary disable support for the HLS parser so that the user can at least use the native one with src= .
2022-02-17 19:52:36 -08:00
Vincent Valot 6d76a135e5 feat: add modern EME support for FairPlay (#3776)
Add support for HLS com.apple.streamingkeydelivery through MSE/EME implementation.

Close #3346

## Tests
Tested on:
- Mac 11.6 Safari 15.2
- iOS 15.2 Safari 15.2
- Mac 11.6 Chrome 96 (for potential regressions on Widevine keySystem)

| Mode | DRM API | TS | CMAF (mono-key and multi-keys)
|---|---|---|---|
| file | EME |   |   |
| file | Legacy-prefixed |    |    |
| media-source | EME | **mux-js**: `encrypted` never fired<br />**real MSE**: `encrypted` event received, but with incorrect `sinf` initData (*1)  |   |
| media-source | Legacy-prefixed | **mux-js**: `webkitneedkey` never fired<br/>**real MSE**: TBD  | 🔴 fails to append media segment to SourceBuffer (init segment ok) `(video:4) – "failed fetch and append: code=3015"` |

## Support table 
| Mode | DRM API | TS | CMAF (mono-key and multi-keys)
|---|---|---|---|
| file | EME |   |   |
| file | Legacy-prefixed |    |    |
| media-source | EME | 🚫 `4040: HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED`  |   |
| media-source | Legacy-prefixed | 🚫 `4041: HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED`  |🚫 `4041: HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED` |

⚠️ Use EME APIs with multi-keys CMAF makes the video stalling with the audio continuing alone after a short time (~3 minutes in the stream, could be shorter, could be longer). Didn't find an explanation to that yet. I've observed the same behaviour with hls.js code so I don't think this is a player issue.
2022-02-07 11:17:22 -08:00
Casey Occhialini 1d54965bdc Update media capability polyfill to account for Playstation 5 (#3808)
Add Playstation 5 detection to the Media Capabilities Polyfill install method.

Fixes #3582

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2021-12-16 12:54:02 -08:00
Joey Parrish d0da2d49e1 fix: Fix mixed clear/encrypted content on Xbox & Tizen
Some platforms seem to ignore EME if the first init segment appended
at the MSE level does not indicate encryption.  To work around this,
we will detect such platforms, and if EME is set up, we will insert
fake encryption metadata into the init segment to convince the
platform to be ready to decrypt.

Closes #2759

Change-Id: Iccf6b8589cf9265ac9bef0d083f4a72f6f2dd628
2021-01-21 18:10:02 +00:00
Joey Parrish 68902b9a86 fix(drm): Remove legacy Edge workarounds on new Edge
We only just gained the ability to test on new Chromium-based Edge
(google/generic-webdriver-server@475ec746), so we did not previously
know which workarounds were specific to legacy Edge.  Now all but one
of those workarounds has been limited to legacy Edge only, and will
not be applied to new Chromium-based Edge.

Change-Id: I70b7480ccb61064b796c3d9b41bbe95cabfdf850
2021-01-05 18:36:52 +00:00
Vincent Valot a344f1017d fix: correctly detect Edge Chromium as Edge (#2855)
Without this, #2801 is broken on the latest versions of Edge
2020-09-17 09:21:38 -07:00
Álvaro Velad Galván 1c4067122a fix: PlayReady only has little-endian key IDs on Edge & IE (#2801)
Rather than list all the platforms that have big-endian PlayReady key IDs, we should list the ones that seem to have little-endian key IDs.
2020-08-19 18:28:47 -07:00
Joey Parrish f539147d48 fix: Correct license headers in compiled output
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.

It seems that the `!` in the header forces the compiler to keep it in
the output.  I believe older compiler releases did this purely based
on `@license`.

Issue #2638

Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
2020-06-09 16:05:09 -07:00
Oren Me 7e1bb94ef6 Fix PlayReady key ID endianness for TiVo (#2582)
For Tivo Box with Opera browser and Opera Devices SDK inbuilt (Virgin Media STB in UK)
2020-05-20 21:04:00 -07:00
Álvaro Velad Galván 6f9b36f755 Allow OPUS on Tizen 5 or higher. (#2564) 2020-05-11 15:07:04 -07:00
Jacob Trimble 5f81429aef Don't allow querySelector.
querySelector isn't available in Shaka Player Embedded.  Since we only
use it to find nodes with a specific tag name, we can usually use
getElementsByTagName.

Issue google/shaka-player-embedded#113

Change-Id: Ia225e5d1f7598b13bd05db868fe2ea566dca4493
2020-03-26 16:37:26 +00:00
Peter Nycander 9b08525efe Tizen2.4 bugfixes (#2449)
`'webkitneedkey'` events are fired with the same `event.initData` for the video and audio tracks, and a new session is needed for each.

Closes #813 (duplicate sessions required on Tizen)
Closes #2447 (polyfills broken on Tizen)
Closes #2448 (PlayReady broken on Tizen)
2020-03-13 10:24:41 -07:00
LanaIV 3dab79e49c Fix error 4012 RESTRICTIONS_CANNOT_BE_MET for Video Futur platform (#2368)
For Video Futur platform, like for Tizen, key IDs should not be
transformed to big-endian UUIDs, it causes `4012
RESTRICTIONS_CANNOT_BE_MET` error.

Issue #2189
2020-02-05 08:18:13 -08:00
Joey Parrish 917e788271 Fix exception thrown for Chrome & Firefox on iOS
Because we have some polyfills and blacklists that are specific to
Safari and iOS, we need to detect specific versions of Safari and iOS.
The existing detection of Safari/iOS versions was in multiple places,
and did not account for non-Safari browsers on iOS.  This refactor
allows us to correctly detect iOS Chrome, and fixes a fatal exception
thrown in the MediaSource polyfill for all non-Safari browsers on iOS.

Change-Id: Ic88dc1a4c82087054cd4791dbf295b7ea2aeab09
2020-02-04 18:57:51 +00:00