Commit Graph

2159 Commits

Author SHA1 Message Date
David HM Morgan 3783ffd44b fix(TTML): Fix timing parsing when using 1dp (#6830)
Fixes #6829
2024-06-14 12:30:01 -07:00
Álvaro Velad Galván ebc834aeec chore(Demo): Allow configure customContextMenu UI config (#6815) 2024-06-13 22:22:20 +02:00
Álvaro Velad Galván 7633286961 test: Enable IMA tests in Tizen (#6813) 2024-06-13 11:06:19 +02:00
Wojciech Tyczyński 8a678f374d feat(Stats): Add manifestGapCount to stats (#6804)
Resolves #6789
2024-06-13 09:41:57 +02:00
Álvaro Velad Galván c866d7b467 feat(HLS): Allow disable streams when the media playlist fails (#6807) 2024-06-13 09:32:09 +02:00
Wojciech Tyczyński 95590adefd fix: selectAudioLanguage() should ignore unplayable variants (#6805)
When restrictions are set, `selectAudioLanguage()` ignores them and may
suggest variant that is marked as unplayable.
2024-06-12 13:38:02 +02:00
Álvaro Velad Galván 4ea9a4471d feat(Ads): Add CUE PRE and POST support in Interstitials (#6799) 2024-06-12 11:50:57 +02:00
Álvaro Velad Galván bf5a103626 feat(HLS): Use PLANNED-DURATION to determine the end time (#6800) 2024-06-12 10:28:55 +02:00
Wojciech Tyczyński 65b0b8dd21 feat(Stats): Add manifestPeriodCount to stats (#6798)
Resolves #6788
2024-06-12 08:37:01 +02:00
Wojciech Tyczyński 2f3a1ebf94 feat(DASH): add MPD_PATCH advanced request type (#6787)
Add `shaka.net.NetworkingEngine.AdvancedRequestType.MPD_PATCH` to
distinguish regular MPD requests from MPD Patch requests.
2024-06-11 10:56:14 +02:00
Álvaro Velad Galván c72493a41b feat(Ads): Add CUE ONCE support in Interstitials (#6785) 2024-06-11 10:37:37 +02:00
Wojciech Tyczyński 309bd72046 fix(DRM): close properly webkit media key sessions (#6775)
On WebOS 3.0 we've noticed an issue in production, where TVs are slowly
starting to throw the following error after a user has watched at least
30+ episodes: `Code: 6006 Category: 6 Severity: 2 ["EME v0.1b key
error",{"errorCode":{"code":1,"systemCode":65535}},"0xffff"]` and can
only be resolved by clearing the app cache, or unplugging the TV.
Further investigation revealed that current workflow, where MSE is
destroyed before DRM Engine causes that old EME implementation is not
able to close session properly.
2024-06-11 08:22:14 +02:00
Wojciech Tyczyński d0d5843d8c feat(Stats): add size of the manifest to player stats (#6783) 2024-06-10 17:26:44 +02:00
Wojciech Tyczyński 081afde932 feat(Stats): count non fatal errors (#6781)
Add `nonFatalErrorCount` to shaka stats.
2024-06-10 13:46:12 +02:00
Wojciech Tyczyński d5b1863157 fix: Fix green screen issue on Edge with mixed content (#6719)
On Edge, to properly play mixed content, we need to insert init segment twice for clear part - once as encrypted, and immediately again as clear. Otherwise we may encounter green screen and errors from video decoder.

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
Co-authored-by: Nick Michael <nick-michael@users.noreply.github.com>
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
2024-06-07 13:06:13 -07:00
Álvaro Velad Galván 60e6847e39 feat(HLS): Add HLS interstitial support (#6761)
Closes https://github.com/shaka-project/shaka-player/issues/3364
2024-06-07 16:12:40 +02:00
Wojciech Tyczyński 48bdf176cb feat: Add audio codec to selectAudioLanguage() (#6723)
- adds optional argument to `selectAudioLanguage()` which gives us a way
to select preferred audio codec
- updates `PreferenceBasedCriteria` to reflect the change
- renders codec in shaka UI to help distinguish tracks with the same
language, role, channels, etc
- can be tested on Chrome with `Tears of Steel (multicodec, TTML)` asset
2024-06-07 15:18:57 +02:00
Álvaro Velad Galván 7bcb86e510 fix(HLS): Fix seekRange when using delta playlist (#6758)
Only happens when we use `useSafariBehaviorForLive = false`.
2024-06-05 14:36:41 +02:00
Álvaro Velad Galván 8d7dd37cfb feat(HLS): Ignore EXT-X-DATERANGE in the past (#6757) 2024-06-05 13:13:17 +02:00
theodab b500799b97 feat(preload): Add new method destroyAllPreloads (#6756) 2024-06-05 12:10:00 +02:00
theodab 9d1fe4abd5 fix(preload): Fix error handling (#6753)
After a previous bugfix to the preload system, we ended up with a
situation where the
overall progress in the preload was tracked by two promises:
`successPromise_`, which is resolved when the preload finishes
successfully.
`destroyPromise_`, which is rejected with an error when the preload
process trips an error condition.
These two promises were confusingly named; it sounds like destroyPromise
is related to the destroy process,
but really it has more to do with errors.
They were also completely redundant, as a single promise can be used to
carry both a resolved and
rejected state.

This PR simply combines the two promises into one.

---------

Co-authored-by: Joey Parrish <joeyparrish@google.com>
2024-06-04 16:08:07 -07:00
Álvaro Velad Galván f8cf146ded chore(Demo): Allow configure preferredAudioCodecs and preferredVideoCodecs (#6735) 2024-06-04 12:04:51 +02:00
Álvaro Velad Galván 7321745b69 chore: Collapse override comments in fake_ad_manager.js (#6741) 2024-06-04 09:29:33 +02:00
Wojciech Tyczyński 97910dc8a9 fix: Support for Zenterio (#6717)
Few bugfixes to support DT Zenterio platform:
- Zenterio seems to have a problem with the EME onKeyStatus event payload (the key statuses map), where the map key ID comes in as empty. This is not correct based on the EME spec:
https://w3c.github.io/encrypted-media/#dom-mediakeysession-keystatuses
- Add polyfills that are used to fix issues with older webkits, same as for older safari browsers
2024-06-03 10:07:04 -07:00
Joey Parrish a7dc138e90 test: Fix Karma debug.html support (#6730)
To debug Karma tests, you can load debug.html in a browser.  However, this context has no back-channel to Karma and tries to load scripts by direct insertion into the document.  For compatibility, we need to have Closure inject scripts with the same methodology, to avoid having scripts load in the wrong order.  We also have to define the dump() method that Karma would normally inject into the testing context.
2024-06-03 09:12:16 -07:00
Álvaro Velad Galván 600c87158a test: Add DASH ClearKey integration test (#6736)
Related to https://github.com/shaka-project/shaka-player/issues/6710
2024-06-03 11:05:37 +02:00
Álvaro Velad Galván 2ec64442e2 feat(HLS): Add support for EXT-X-DATERANGE (#6718)
Closes https://github.com/shaka-project/shaka-player/issues/3523
2024-06-03 10:10:39 +02:00
Joey Parrish 89c8361ee0 test: Fix exception calling setVolume() in ads test (#6731)
MockAdManager did not define setVolume() in this one test, causing the
test to throw an exception. This exception got swallowed and did not
fail the test, but was noticed in the JS console during a Karma debug
run.
2024-05-31 16:44:32 -07:00
Joey Parrish 8d680e56b4 feat: Add segment URIs to segment-related errors (#6714)
This makes it more feasible to debug and fix transmuxer bugs or other segment append failures.

Closes #6712
2024-05-31 09:41:45 -07:00
theodab 1cfb53e648 fix(preload): Copy net filters to preload manager (#6709)
Some assets might rely on networking engine filters (request and
response filters) to properly download their assets. However, the
preload manager's need to use a fresh networking engine also caused it
to not use any filters set on the player already. This changes the
process of setting up a preload manager, to make it copy over any
filters defined on the player's networking engine.

Fixes #6698
2024-05-30 12:45:12 +02:00
Álvaro Velad Galván 082f897701 feat(HLS): Build closed captions metadata on-the-fly (#6700)
Closes https://github.com/shaka-project/shaka-player/issues/1826

Also fixes variable substitution when using `getMediaPlaylistBasicInfo_`
2024-05-30 11:02:01 +02:00
Álvaro Velad Galván 6a5cbef007 test: Update screenshots (#6706)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-30 08:28:05 +02:00
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
Álvaro Velad Galván 9060ab0a34 feat(DASH): Parse and use target latency (#6683)
Related to https://github.com/shaka-project/shaka-player/pull/6193
Thanks to @gkatsev
2024-05-29 09:45:09 +02:00
Dave Nicholas d38aabf04d feat(DASH): Add MPD Patch support (#5247)
Closes https://github.com/shaka-project/shaka-player/issues/2228

---------

Co-authored-by: Wojciech Tyczyński <wojciech.tyczynski@sky.uk>
2024-05-29 08:11:28 +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 00c5c1da16 fix(Cast): Incorrect detection of MediaCapabilities on Chromecast (#6656)
Fixes https://github.com/shaka-project/shaka-player/issues/5776
2024-05-28 09:03:55 +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 3b90bec7e4 test: Update player_external test to allow test all Demo assets (#6661) 2024-05-24 19:00:04 +02:00
Álvaro Velad Galván 6a8dbf7686 test: Consolidate probeSupport in one place (#6667) 2024-05-24 11:00:07 +02:00
Álvaro Velad Galván 894c2f94b9 test: Load IMA globally in one place once (#6666) 2024-05-24 10:45:59 +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 e7b893b74e feat: Add config for add headers to license requests (#6650)
Co-authored-by: Joey Parrish <joeyparrish@google.com>
2024-05-23 09:45:25 +02:00
Álvaro Velad Galván 520930c665 feat(Ads): Support CS on devices that don't support multiple media elements (#6575)
Closes https://github.com/shaka-project/shaka-player/issues/2792
2024-05-23 09:25:33 +02:00
Álvaro Velad Galván dda713aa71 feat: Optionally force HTTP content URIs (#6649)
This may be necessary on older devices where not all certificates are
present.
2024-05-23 04:16:18 +02:00
Joey Parrish c48e4351e7 test: Flatten test environment for Chromecast (#6640)
Chromecast WebDriver Server and Karma both used iframes, which caused
complications when testing on Chromecast. The test environment couldn't
directly access `cast.__platform__` APIs, and more recently stopped
being able to access EME due to presumed mistakes in the platform's
implementation of iframe permission policies.

This resolves the issue by removing iframes at both levels.

- Flatten Karma's environment using "useIframe: false" and "runInParent: true"
- Remove test flag --single-run; not supported in combination with Karma's "useIframe: false" option
- Add a test boot file to force closure to use dynamic script tags instead of document.write; required with Karma's "useIframe: false" option
 - Adjust screenshot tests not to assume an iframe host
 - Fix compatibilty between Tizen and Karma's useIframe:false
- https://github.com/joeyparrish/karma/commit/32e87357a0ca4bf5d3de6d78d80dae2d065fd407
- https://github.com/joeyparrish/karma/commit/f2132cc2cf72f9408fbce2a20b5a21999f1e9416
2024-05-22 16:59:56 -07:00
Joey Parrish 7ab0691502 test: Bypass log settings for support dump (#6654)
Karma creates a dump() function on the context window that we can use to
log something to the console without respect for the normal
captureConsole setting. Use this for the output of probeSupport(), so we
always have it in CI logs.
2024-05-22 16:58:06 -07:00
Joey Parrish 26c3f648bc test: Log support map on test startup (#6638)
When running tests with logging enabled, the logs will now always
contain a full map of media features supported on this platform.

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-05-21 17:49:40 +02:00
Álvaro Velad Galván 82c5149375 feat(DASH): Add MPD Chaining support (#6641)
Close https://github.com/shaka-project/shaka-player/issues/3926
2024-05-21 09:57:16 +02:00
Joey Parrish ec4bc1ddeb test: Fix Chromecast testing in lab (#6643)
These changes are necessary for compatibility with Chromecast WebDriver Server v2.

 - Fix a bug in Karma's flat environment support (joeyparrish/karma@9875e98)
 - Add a test boot file to load CAF on Chromecast devices; required by Chromecast WebDriver Server v2's redirect mode (flat environment at that level)
 - Also load this cast-boot file in support.html
 - Rename/reorganize Cast-related externs, which were messy even before the addition of CAF
 - Remove proxy-cast-platform.js; no longer needed as we move to flatten the test environment
 - Ignore error events with "null" error; these appear on Linux Chromecasts, only since including CAF
 - Ignore error events that are actually strings; these appear on Linux Chromecasts, only since including CAF
 - Disable Fuchsia in the lab until autoplay issues can be resolved
2024-05-20 15:14:49 -07:00