From 1209756616af52843f55ac53e2c7fbe29df63541 Mon Sep 17 00:00:00 2001 From: Matt Luedke Date: Tue, 14 Nov 2023 14:51:14 -0500 Subject: [PATCH 1/4] fix: use correct icon for Video.js 8 --- src/scss/quality-selector.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scss/quality-selector.scss b/src/scss/quality-selector.scss index 14d263a..b1d8095 100644 --- a/src/scss/quality-selector.scss +++ b/src/scss/quality-selector.scss @@ -12,7 +12,14 @@ font-weight: normal; font-style: normal; &::before { - content: '\f110'; + // The correct icon font character for Video.js 7 and below: + .video-js:not(.vjs-v8) & { + content: '\f110'; + } + // Icon font character for Video.js 8: + .vjs-v8 & { + content: '\f114'; + } } } } From f77455fb01ebddb2ec1c588a954f48498409cf46 Mon Sep 17 00:00:00 2001 From: Matt Luedke Date: Tue, 14 Nov 2023 14:52:06 -0500 Subject: [PATCH 2/4] docs: update demo source files to use Video.js 8 --- docs/demo/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/demo/index.html b/docs/demo/index.html index b90232c..3ef75a8 100644 --- a/docs/demo/index.html +++ b/docs/demo/index.html @@ -3,8 +3,8 @@ videojs-quality-selector Demo - - + + From 0e3e2171b587830555d79af8c4270828a4d1ca7f Mon Sep 17 00:00:00 2001 From: Matt Luedke Date: Tue, 14 Nov 2023 15:20:29 -0500 Subject: [PATCH 3/4] chore: update caniuse database for latest browser usage stats --- package-lock.json | 16 ++++++++++------ package.json | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cabf52..9423c46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4841,9 +4841,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001562", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz", + "integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==", "dev": true, "funding": [ { @@ -4853,6 +4853,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -19214,9 +19218,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001562", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz", + "integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==", "dev": true }, "caseless": { diff --git a/package.json b/package.json index 28f172f..b1cf90e 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "@silvermine/eslint-config": "3.0.1", "@silvermine/standardization": "2.0.0", "autoprefixer": "8.6.5", - "babelify": "10.0.0", "babel-eslint": "10.1.0", + "babelify": "10.0.0", "check-node-version": "4.0.3", "core-js": "3.11.0", "coveralls": "3.0.3", From 99b43e55bfc44a69b395f8487850dcf8161f3b4b Mon Sep 17 00:00:00 2001 From: Matt Luedke Date: Tue, 14 Nov 2023 15:36:19 -0500 Subject: [PATCH 4/4] docs: add warning to README about ES5 compatibility --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b1902d4..9ea6cef 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,17 @@ Remember to also add the CSS to your build. With most bundlers you can: require('@silvermine/videojs-quality-selector/dist/css/quality-selector.css') ``` +> [!WARNING] +> This plugin's source code uses ES6+ syntax and keywords, such as `class` and `static`. +> If you need to support [browsers that do not support newer JavaScript +> syntax](https://caniuse.com/es6), you will need to use a tool like +> [Babel](https://babeljs.io/) to transpile and polyfill your code. +> +> Alternatively, you can +> `require('@silvermine/videojs-chromecast/dist/js/silvermine-videojs-quality-selector.js')` +> to use a JavaScript file that has already been polyfilled/transpiled down to ES5 +> compatibility. + ### Providing video sources Sources can be provided with either the `` tag or via the `src` function on the