Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Video.js 8 #104

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<source>` tag or via the `src` function on the
Expand Down
4 changes: 2 additions & 2 deletions docs/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset=utf-8 />
<title>videojs-quality-selector Demo</title>
<link href="https://unpkg.com/video.js@7.5.4/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@7.5.4/dist/video.js"></script>
<link href="https://unpkg.com/video.js@8.6.1/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@8.6.1/dist/video.js"></script>
<script src="../../dist/js/silvermine-videojs-quality-selector.min.js"></script>
<link href="../../dist/css/quality-selector.css" rel="stylesheet">
</head>
Expand Down
16 changes: 10 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 8 additions & 1 deletion src/scss/quality-selector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
}
}
Expand Down