There was a potential type error in an edge case in lib/player.js. It
would have been caught by the latest compiler, so this upgrades the
compiler and fixes another type error in one other place, as well.
Changes are as follows:
1. Fixed demo breaking dependencies.
2. Fixed some typos
3. Added LCEVC support section to readme.
Co-authored-by: Vinod Balakrishnan <vinod.balakrishnan@v-nova.com>
Most of our existing dev dependencies require node 12+, and node 16 is the active LTS for several more months. Let's make node 14 the required minimum for Shaka Player development, to avoid issues with our dev deps failing on older versions.
Includes a YAML config file for our lab, and documentation on how to
create a custom config for another Selenium grid.
A workflow will run tests nightly in the Shaka lab, using a
self-hosted runner with access to our private grid.
The workflow can also be triggered manually by maintainers to test a
PR in the lab. This will report status back to the PR.
The depswriter.py tool from google-closure-library was generating
deprecation warnings. This switches to a newer, rewritten version
called google-closure-deps.
In #3991, I changed the syntax of our colors to a modern rgba syntax.
For example, rgba(255, 255, 255, 0.85) would become rgba(255 255 255 /
85%). However, less v3 seems not to understand that properly, and
performs division on the last two parts, resulting in output of
rgba(255 255 3%), which is indeed invalid.
This fixes the issue by upgrading to less v4, which understands the
new rgba syntax and leaves it alone. The output for that will now
match the input.
To work around an issue with less v4, this uses a prerelease version
with a fix for https://github.com/less/less.js/issues/3693 . See also
https://github.com/tomas/needle/issues/391
This doesn't affect any release branches, since #3991 hasn't been
cherry-picked.
Closes#4027
These projects have vulnerable dependencies, but are not being
properly maintained. This replaces both with forks that have upgraded
their deps.
This brings the NPM audit vulnerability count from 6 to 0.
This updates the jsdoc fork to one based on the latest jsdoc. (The
fork adds features for tutorial sorting.)
We also have an in-repo fork of the default jsdoc template from 2019.
The newer default template no longer includes the same dependencies,
so three deps we used to get transitively from jsdoc are now explicit
at the shaka-player level: open-sans-fonts, code-prettify, and
color-themes-for-google-code-prettify. This is appropriate, since the
dependency comes from our in-repo fork of the default template.
This upgrade brings our NPM audit vulnerabilities from 10 to 6.
The new version requires additional configuration for less syntax, and
has new default rules we were out of compliance with.
I disabled rules about avoiding explicit vendor prefixes (such as
"-webkit") because we are not using any auto-prefixer tools. Other
violations have been fixed:
- kebab-case for element ids
- quotes around URLs
- double quotes instead of single quotes
- disable class selector pattern matching for MDL (external)
- use modern rgb/rgba syntax
- no quotes on font families
- no long-hand when short-hand will do
This brings our NPM audit vulnerabilities from 20 down to 10.
Downgrade less to v3. v4 is failing on macOS for some reason. See
less/less.js#3693
This also makes some less/CSS changes that are useful for future
upgrades:
- wrap all calculations in calc(), which is required in less v4
- remove unneeded @transparent variable
Finally, this fixes an erroneous error message that said "extern
generation failed" instead of "CSS compilation failed".
Closes#3981
This updates the compiler and closure library to the latest releases.
This required a few small tweaks:
- Drop custom extern for WebCrypto (now built into the compiler)
- Remove require() in cea parser, only used in `throws` annotations
- Hack around a typing issue in a fake version of TextTrack in tests
Most dependencies are not used in Shaka Player itself, but in our
build and test infra or in our demo app. Still, GitHub reported 29
potential vulnerabilities in these deps, and NPM reported 37.
The changes below being NPM's audit report from 37 down to 24
vulnerabilities.
Detailed updates:
- Dropped explicit deps for transitive dependencies that we no longer
need to update for ourselves:
- ua-parser-js (via karma)
- Dropped because we no longer need them:
- karma-ie-launcher
- Updated to latest versions:
- awesomplete
- core-js
- dialog-polyfill
- htmlhint
- jimp
- karma*
- less
- pwacompat
- rimraf
- tippy.js
- which
- Updated as far as possible without code or config changes in Shaka:
- mux.js
- stylelint*
- Still needs an update:
- *babel*
- eslint
- eslint-config-google
- google-closure-compiler
- google-closure-library
Some of the vulnerabilities stem from stylelint, babel, and others
that haven't been updated yet, so follow-up work is needed to address
those with breaking updates.
mux.js is actually used at runtime (optional), so it was only updated
to the latest non-breaking release.
* test: Switch local Chrome, Edge, Firefox, and Safari launchers to WebDriver-based
This will enable WebDriver-based screenshot tests in local test runs.
* test: Add screenshots for Edge on Mac
Instead of pixel-wise comparison with a change threshold, we now use a
structural similarity (ssim) module to decide how much a screenshot
has changed. This better tolerates small rendering differences due to
differences in GPUs across machines.
The latest compiler should treat `@expose` as a parser error, so the
BanExpose conformance rule is no longer needed.
This upgrades the compiler & closure libraries to the latest releases
from NPM, makes matching updates to the compiler command line (no more
`strictMissingRequire` error category), and removes the BanExpose
conformance rule.
Change-Id: I45e8e71ad5f42fee289a8ddd30141e15f3f425a8
In StreamUtils, use MediaCapabilities.decodingInfo() instead of
MediaSource.isTypeSupported() to check if the stream is supported.
MediaCapabilities.decodingInfo() takes an
MediaDecodingConfiguration object as input, and returns a Promise
with a MediaCapabilitiesInfo object. The returned object tells us
whether decoding the media is supported, smooth, and
powerefficient.
Steps:
1. Create a MediaDecodingConfiguration object for each variant as
the input.
2. Query the decodingInfo API with the config.
3. Get the 'supported' info from the decodingInfo result, to know
whether the variant is supported.
Issue #1391
Change-Id: I8fc2d3ec6a9868f38269d550d35f45c298faae98
Karma had an explicit dependency on ua-parser-js "0.7.22". Not
"^0.7.22", which is a range including newer bugfix releases, but
_exactly_ 0.7.22. This meant our explicit requirement for a newer
version of ua-parser-js wasn't working, because it conflicted with
Karma's.
This dependency bug was fixed in Karma v6. Upgrading Karma to v6
allows us to get an updated version of ua-parser-js which includes
fixes for Xbox & Chromecast detection. (Karma's new dependency is
"^0.7.23", which includes 0.7.24, where Xbox detection was fixed.)
We will keep our explicit dependency on ua-parser-js "^0.7.24", which
will ensure we don't get 0.7.23, which could not correctly detect Xbox
One (which we now support). But this explicit dependency no longer
conflict's with Karma's, and will serve as an "upgrade" to theirs.
Change-Id: I72b0df9c1bda33c0ae937d79e0b143b1219ef1cb
The ua-parser-js fork was created to add Xbox One detection support,
but the PR has been merged and the released upstream as 0.7.24.
Change-Id: I14016837bc20da43b077fef7654f9bab8404046e
This updates the UA parser to one that recognizes Xbox devices
including Xbox One. Corresponds to PR faisalman/ua-parser-js#479
Change-Id: I5e92e78b06c981df1659f73264b6fabfc5eb56ac
The new eslint found many style errors which have now been corrected.
It also complains a lot about atomic update issues that do not seem to
exist, so that rule has been disabled.
This upgrade will allow us to adopt eslint's "id-denylist" instead of
the older "id-blacklist" rule, the name of which violates new Google
guidelines about respectful language.
Bug: 178203011
Change-Id: Ia65581b96e4dd1331f720fa396183dca020b9caf
For a while, we were forced to use a fork of stylelint with a
bugfix necessary for our test bots to run the tool.
That behavior has now been merged into normal stylelint, so we
can stop using that fork.
Change-Id: I51196f8dab73ac1f814137d2f191a08c231fd369