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.
- 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
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>
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
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.
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.
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
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.
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`.
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
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.
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>
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