Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
40395a1ff5 | |||
9ea3a6923d | |||
675a853e2e | |||
950786b117 | |||
626e1dba64 | |||
cbd1596af4 | |||
6ea510c36e | |||
0acf228dcd | |||
91b19baf44 | |||
990d636019 | |||
b9c792b377 |
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"plugins": ["stylelint-selector-bem-pattern", "stylelint-scss"],
|
"plugins": ["stylelint-selector-bem-pattern"],
|
||||||
"extends": ["stylelint-config-recommended", "stylelint-config-sass-guidelines", "stylelint-config-prettier"],
|
"extends": ["stylelint-config-sass-guidelines", "stylelint-config-prettier"],
|
||||||
|
"customSyntax": "postcss-scss",
|
||||||
"rules": {
|
"rules": {
|
||||||
"selector-class-pattern": null,
|
"selector-class-pattern": null,
|
||||||
"selector-no-qualifying-type": [
|
"selector-no-qualifying-type": [
|
||||||
@ -9,10 +10,7 @@
|
|||||||
"ignore": ["attribute", "class"]
|
"ignore": ["attribute", "class"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"string-no-newline": null,
|
"max-nesting-depth": 4,
|
||||||
"indentation": 2,
|
|
||||||
"string-quotes": "single",
|
|
||||||
"max-nesting-depth": 2,
|
|
||||||
"plugin/selector-bem-pattern": {
|
"plugin/selector-bem-pattern": {
|
||||||
"preset": "bem",
|
"preset": "bem",
|
||||||
"componentName": "(([a-z0-9]+(?!-$)-?)+)",
|
"componentName": "(([a-z0-9]+(?!-$)-?)+)",
|
||||||
|
18
CHANGELOG.md
18
CHANGELOG.md
@ -1,3 +1,15 @@
|
|||||||
|
### v3.6.11
|
||||||
|
|
||||||
|
- Fix: Replace `list.slash` added in 3.6.10 with `calc`
|
||||||
|
- Chore: Package upgrades
|
||||||
|
- Chore: SASS clean up
|
||||||
|
- Chore: Improvements to style linting
|
||||||
|
|
||||||
|
### v3.6.10
|
||||||
|
|
||||||
|
- Fix: Use `list.slash` instead of deprecated syntax
|
||||||
|
- Chore: Clean up demo
|
||||||
|
|
||||||
### v3.6.9
|
### v3.6.9
|
||||||
|
|
||||||
- Fix: SASS issue with division (thanks @ROL4ND909 and @le0pard)
|
- Fix: SASS issue with division (thanks @ROL4ND909 and @le0pard)
|
||||||
@ -61,7 +73,7 @@
|
|||||||
- Fix "A `ReferenceError: _classCallCheck is not defined` error has occurred." error (thanks @hex-ci)
|
- Fix "A `ReferenceError: _classCallCheck is not defined` error has occurred." error (thanks @hex-ci)
|
||||||
- Fix issue with CSS custom property check (thanks @syedhusain-appspace)
|
- Fix issue with CSS custom property check (thanks @syedhusain-appspace)
|
||||||
- Fix for slow loading videos not autoplaying (thanks @DanielHuntleySBG)
|
- Fix for slow loading videos not autoplaying (thanks @DanielHuntleySBG)
|
||||||
- Fix for betwork requests are not cancelled after the player is destroyed (thanks @DanielHuntleySBG)
|
- Fix for network requests are not cancelled after the player is destroyed (thanks @DanielHuntleySBG)
|
||||||
- Added option to disable custom controls for YouTube and Vimeo
|
- Added option to disable custom controls for YouTube and Vimeo
|
||||||
|
|
||||||
### v3.6.2
|
### v3.6.2
|
||||||
@ -106,7 +118,7 @@
|
|||||||
### v3.5.8
|
### v3.5.8
|
||||||
|
|
||||||
- Added `flex-direction` property to fix some issues introduced in v3.5.7 when using custom CSS
|
- Added `flex-direction` property to fix some issues introduced in v3.5.7 when using custom CSS
|
||||||
- Cleaned up the organisation of some of the SCSS files (should not effect CSS output)
|
- Cleaned up the organization of some of the SCSS files (should not effect CSS output)
|
||||||
- Added `referrerPolicy` option for Vimeo to prevent an issue present in the demo site
|
- Added `referrerPolicy` option for Vimeo to prevent an issue present in the demo site
|
||||||
- Remove all Vimeo controls for Pro & Premium accounts
|
- Remove all Vimeo controls for Pro & Premium accounts
|
||||||
- Improve thumbnail size calculations when size is set per css (thanks @ydylla)
|
- Improve thumbnail size calculations when size is set per css (thanks @ydylla)
|
||||||
@ -121,7 +133,7 @@
|
|||||||
- Accessibility tweak for the play button (thanks @lunika)
|
- Accessibility tweak for the play button (thanks @lunika)
|
||||||
- Fix for ads configuration (thanks @SoftCreatR)
|
- Fix for ads configuration (thanks @SoftCreatR)
|
||||||
- Fix handling listener return value (thanks @taion)
|
- Fix handling listener return value (thanks @taion)
|
||||||
- Added localisation key for PIP (picture-in-picture) (thanks @lmislm)
|
- Added localization key for PIP (picture-in-picture) (thanks @lmislm)
|
||||||
- Preserve viewBox attribute in SVG sprite symbols (thanks @bseib)
|
- Preserve viewBox attribute in SVG sprite symbols (thanks @bseib)
|
||||||
- Fix being unable to unmute autoplayed video on iOS (thanks @sumanbh)
|
- Fix being unable to unmute autoplayed video on iOS (thanks @sumanbh)
|
||||||
- Fixed Plyr container not resizing responsively (thanks @shravan2x)
|
- Fixed Plyr container not resizing responsively (thanks @shravan2x)
|
||||||
|
@ -35,7 +35,7 @@ controls: [
|
|||||||
|
|
||||||
### Internationalization using default controls
|
### Internationalization using default controls
|
||||||
|
|
||||||
You can provide an `i18n` object as one of your options when initialising the plugin which we be used when rendering the controls.
|
You can provide an `i18n` object as one of your options when initializing the plugin which we be used when rendering the controls.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
|
32
README.md
32
README.md
@ -131,21 +131,21 @@ Alternatively you can include the `plyr.js` script before the closing `</body>`
|
|||||||
|
|
||||||
See [initialising](#initialising) for more information on advanced setups.
|
See [initialising](#initialising) for more information on advanced setups.
|
||||||
|
|
||||||
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills seperately as part of your application but to make life easier you can use the polyfilled build.
|
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills separately as part of your application but to make life easier you can use the polyfilled build.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/3.6.9/plyr.js"></script>
|
<script src="https://cdn.plyr.io/3.6.11/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
...or...
|
...or...
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/3.6.9/plyr.polyfilled.js"></script>
|
<script src="https://cdn.plyr.io/3.6.11/plyr.polyfilled.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
## CSS
|
## CSS
|
||||||
|
|
||||||
Include the `plyr.css` stylsheet into your `<head>`.
|
Include the `plyr.css` stylesheet into your `<head>`.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="path/to/plyr.css" />
|
<link rel="stylesheet" href="path/to/plyr.css" />
|
||||||
@ -154,13 +154,13 @@ Include the `plyr.css` stylsheet into your `<head>`.
|
|||||||
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
|
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.9/plyr.css" />
|
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.11/plyr.css" />
|
||||||
```
|
```
|
||||||
|
|
||||||
## SVG Sprite
|
## SVG Sprite
|
||||||
|
|
||||||
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
|
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
|
||||||
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.6.9/plyr.svg`.
|
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.6.11/plyr.svg`.
|
||||||
|
|
||||||
# Ads
|
# Ads
|
||||||
|
|
||||||
@ -267,9 +267,7 @@ You can set them in your CSS for all players:
|
|||||||
...or in your HTML:
|
...or in your HTML:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<video class="player" style="--plyr-color-main: #1ac266;">
|
<video class="player" style="--plyr-color-main: #1ac266;">...</video>
|
||||||
...
|
|
||||||
</video>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### SASS
|
### SASS
|
||||||
@ -344,7 +342,7 @@ The HTMLElement or string selector can be the target `<video>`, `<audio>`, or `<
|
|||||||
You have two choices here. You can either use a simple array loop to map the constructor:
|
You have two choices here. You can either use a simple array loop to map the constructor:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const players = Array.from(document.querySelectorAll('.js-player')).map(p => new Plyr(p));
|
const players = Array.from(document.querySelectorAll('.js-player')).map((p) => new Plyr(p));
|
||||||
```
|
```
|
||||||
|
|
||||||
...or use a static method where you can pass a [CSS string selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors), a [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList), an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [HTMLElement](https://developer.mozilla.org/en/docs/Web/API/HTMLElement), or a [JQuery](https://jquery.com) object:
|
...or use a static method where you can pass a [CSS string selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors), a [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList), an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [HTMLElement](https://developer.mozilla.org/en/docs/Web/API/HTMLElement), or a [JQuery](https://jquery.com) object:
|
||||||
@ -400,7 +398,7 @@ Note the single quotes encapsulating the JSON and double quotes on the object ke
|
|||||||
| `invertTime` | Boolean | `true` | Display the current time as a countdown rather than an incremental counter. |
|
| `invertTime` | Boolean | `true` | Display the current time as a countdown rather than an incremental counter. |
|
||||||
| `toggleInvert` | Boolean | `true` | Allow users to click to toggle the above. |
|
| `toggleInvert` | Boolean | `true` | Allow users to click to toggle the above. |
|
||||||
| `listeners` | Object | `null` | Allows binding of event listeners to the controls before the default handlers. See the `defaults.js` for available listeners. If your handler prevents default on the event (`event.preventDefault()`), the default handler will not fire. |
|
| `listeners` | Object | `null` | Allows binding of event listeners to the controls before the default handlers. See the `defaults.js` for available listeners. If your handler prevents default on the event (`event.preventDefault()`), the default handler will not fire. |
|
||||||
| `captions` | Object | `{ active: false, language: 'auto', update: false }` | `active`: Toggles if captions should be active by default. `language`: Sets the default language to load (if available). 'auto' uses the browser language. `update`: Listen to changes to tracks and update menu. This is needed for some streaming libraries, but can result in unselectable language options). |
|
| `captions` | Object | `{ active: false, language: 'auto', update: false }` | `active`: Toggles if captions should be active by default. `language`: Sets the default language to load (if available). 'auto' uses the browser language. `update`: Listen to changes to tracks and update menu. This is needed for some streaming libraries, but can result in non-selectable language options). |
|
||||||
| `fullscreen` | Object | `{ enabled: true, fallback: true, iosNative: false, container: null }` | `enabled`: Toggles whether fullscreen should be enabled. `fallback`: Allow fallback to a full-window solution (`true`/`false`/`'force'`). `iosNative`: whether to use native iOS fullscreen when entering fullscreen (no custom controls). `container`: A selector for an ancestor of the player element, allows contextual content to remain visual in fullscreen mode. Non-ancestors are ignored. |
|
| `fullscreen` | Object | `{ enabled: true, fallback: true, iosNative: false, container: null }` | `enabled`: Toggles whether fullscreen should be enabled. `fallback`: Allow fallback to a full-window solution (`true`/`false`/`'force'`). `iosNative`: whether to use native iOS fullscreen when entering fullscreen (no custom controls). `container`: A selector for an ancestor of the player element, allows contextual content to remain visual in fullscreen mode. Non-ancestors are ignored. |
|
||||||
| `ratio` | String | `null` | Force an aspect ratio for all videos. The format is `'w:h'` - e.g. `'16:9'` or `'4:3'`. If this is not specified then the default for HTML5 and Vimeo is to use the native resolution of the video. As dimensions are not available from YouTube via SDK, 16:9 is forced as a sensible default. |
|
| `ratio` | String | `null` | Force an aspect ratio for all videos. The format is `'w:h'` - e.g. `'16:9'` or `'4:3'`. If this is not specified then the default for HTML5 and Vimeo is to use the native resolution of the video. As dimensions are not available from YouTube via SDK, 16:9 is forced as a sensible default. |
|
||||||
| `storage` | Object | `{ enabled: true, key: 'plyr' }` | `enabled`: Allow use of local storage to store user settings. `key`: The key name to use. |
|
| `storage` | Object | `{ enabled: true, key: 'plyr' }` | `enabled`: Allow use of local storage to store user settings. `key`: The key name to use. |
|
||||||
@ -437,7 +435,7 @@ const player = new Plyr('#player', {
|
|||||||
You can also access the object through any events:
|
You can also access the object through any events:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
element.addEventListener('ready', event => {
|
element.addEventListener('ready', (event) => {
|
||||||
const player = event.detail.plyr;
|
const player = event.detail.plyr;
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -452,7 +450,7 @@ player.fullscreen.enter(); // Enter fullscreen
|
|||||||
```
|
```
|
||||||
|
|
||||||
| Method | Parameters | Description |
|
| Method | Parameters | Description |
|
||||||
| -------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
|
| -------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||||
| `play()`¹ | - | Start playback. |
|
| `play()`¹ | - | Start playback. |
|
||||||
| `pause()` | - | Pause playback. |
|
| `pause()` | - | Pause playback. |
|
||||||
| `togglePlay(toggle)`¹ | Boolean | Toggle playback, if no parameters are passed, it will toggle based on current status. |
|
| `togglePlay(toggle)`¹ | Boolean | Toggle playback, if no parameters are passed, it will toggle based on current status. |
|
||||||
@ -467,7 +465,7 @@ player.fullscreen.enter(); // Enter fullscreen
|
|||||||
| `fullscreen.exit()` | - | Exit fullscreen. |
|
| `fullscreen.exit()` | - | Exit fullscreen. |
|
||||||
| `fullscreen.toggle()` | - | Toggle fullscreen. |
|
| `fullscreen.toggle()` | - | Toggle fullscreen. |
|
||||||
| `airplay()` | - | Trigger the airplay dialog on supported devices. |
|
| `airplay()` | - | Trigger the airplay dialog on supported devices. |
|
||||||
| `setPreviewThumbnails(source: PreviewThumbnailsOptions)` | - | Sets the preview thubmnails for the current source. |
|
| `setPreviewThumbnails(source: PreviewThumbnailsOptions)` | - | Sets the preview thumbnails for the current source. |
|
||||||
| `toggleControls(toggle)` | Boolean | Toggle the controls (video only). Takes optional truthy value to force it on/off. |
|
| `toggleControls(toggle)` | Boolean | Toggle the controls (video only). Takes optional truthy value to force it on/off. |
|
||||||
| `on(event, function)` | String, Function | Add an event listener for the specified event. |
|
| `on(event, function)` | String, Function | Add an event listener for the specified event. |
|
||||||
| `once(event, function)` | String, Function | Add an event listener for the specified event once. |
|
| `once(event, function)` | String, Function | Add an event listener for the specified event once. |
|
||||||
@ -514,7 +512,7 @@ player.fullscreen.active; // false;
|
|||||||
| `loop` | ✓ | ✓ | Gets or sets the current loop state of the player. The setter accepts a boolean. |
|
| `loop` | ✓ | ✓ | Gets or sets the current loop state of the player. The setter accepts a boolean. |
|
||||||
| `source` | ✓ | ✓ | Gets or sets the current source for the player. The setter accepts an object. See [source setter](#the-source-setter) below for examples. |
|
| `source` | ✓ | ✓ | Gets or sets the current source for the player. The setter accepts an object. See [source setter](#the-source-setter) below for examples. |
|
||||||
| `poster` | ✓ | ✓ | Gets or sets the current poster image for the player. The setter accepts a string; the URL for the updated poster image. |
|
| `poster` | ✓ | ✓ | Gets or sets the current poster image for the player. The setter accepts a string; the URL for the updated poster image. |
|
||||||
| `previewThumbnails` | ✓ | ✓ | Gets or sets the current preview Thubmnail source for the player. The setter accepts a string |
|
| `previewThumbnails` | ✓ | ✓ | Gets or sets the current preview thumbnail source for the player. The setter accepts a string |
|
||||||
| `autoplay` | ✓ | ✓ | Gets or sets the autoplay state of the player. The setter accepts a boolean. |
|
| `autoplay` | ✓ | ✓ | Gets or sets the autoplay state of the player. The setter accepts a boolean. |
|
||||||
| `currentTrack` | ✓ | ✓ | Gets or sets the caption track by index. `-1` means the track is missing or captions is not active |
|
| `currentTrack` | ✓ | ✓ | Gets or sets the caption track by index. `-1` means the track is missing or captions is not active |
|
||||||
| `language` | ✓ | ✓ | Gets or sets the preferred captions language for the player. The setter accepts an ISO two-letter language code. Support for the languages is dependent on the captions you include. If your captions don't have any language data, or if you have multiple tracks with the same language, you may want to use `currentTrack` instead. |
|
| `language` | ✓ | ✓ | Gets or sets the preferred captions language for the player. The setter accepts an ISO two-letter language code. Support for the languages is dependent on the captions you include. If your captions don't have any language data, or if you have multiple tracks with the same language, you may want to use `currentTrack` instead. |
|
||||||
@ -637,7 +635,7 @@ reference to the instance, you can use the `on()` API method or `addEventListene
|
|||||||
property. Here's an example:
|
property. Here's an example:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
player.on('ready', event => {
|
player.on('ready', (event) => {
|
||||||
const instance = event.detail.plyr;
|
const instance = event.detail.plyr;
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -785,7 +783,7 @@ If a User Agent is disabled but supports `<video>` and `<audio>` natively, it wi
|
|||||||
Some awesome folks have made plugins for CMSs and Components for JavaScript frameworks:
|
Some awesome folks have made plugins for CMSs and Components for JavaScript frameworks:
|
||||||
|
|
||||||
| Type | Maintainer | Link |
|
| Type | Maintainer | Link |
|
||||||
| --------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
| ----------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||||
| WordPress | Brandon Lavigne ([@drrobotnik](https://github.com/drrobotnik)) | [https://wordpress.org/plugins/plyr/](https://wordpress.org/plugins/plyr/) |
|
| WordPress | Brandon Lavigne ([@drrobotnik](https://github.com/drrobotnik)) | [https://wordpress.org/plugins/plyr/](https://wordpress.org/plugins/plyr/) |
|
||||||
| Angular | Simon Bobrov ([@smnbbrv](https://github.com/smnbbrv)) | [https://github.com/smnbbrv/ngx-plyr](https://github.com/smnbbrv/ngx-plyr) |
|
| Angular | Simon Bobrov ([@smnbbrv](https://github.com/smnbbrv)) | [https://github.com/smnbbrv/ngx-plyr](https://github.com/smnbbrv/ngx-plyr) |
|
||||||
| React | Chintan Prajapati ([@chintan9](https://github.com/chintan9)) | [https://github.com/chintan9/plyr-react](https://github.com/chintan9/plyr-react) |
|
| React | Chintan Prajapati ([@chintan9](https://github.com/chintan9)) | [https://github.com/chintan9/plyr-react](https://github.com/chintan9/plyr-react) |
|
||||||
|
@ -105,14 +105,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
Premium video monetization from
|
|
||||||
<a href="https://vi.ai/publisher-video-monetization/?aid=plyrio" target="_blank" class="no-border">
|
|
||||||
<img src="https://cdn.plyr.io/static/vi-logo-24x24.svg" alt="ai.vi" />
|
|
||||||
<span class="sr-only">ai.vi</span>
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="call-to-action">
|
<div class="call-to-action">
|
||||||
<a href="https://github.com/sampotts/plyr" target="_blank" class="button js-shr">
|
<a href="https://github.com/sampotts/plyr" target="_blank" class="button js-shr">
|
||||||
<svg class="icon" role="presentation">
|
<svg class="icon" role="presentation">
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// Plyr.io Demo Page
|
// Plyr.io Demo Page
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
@charset 'UTF-8';
|
@charset 'UTF-8';
|
||||||
|
|
||||||
@import '../../../../src/sass/lib/css-vars';
|
@import '../../../../src/sass/lib/css-vars';
|
||||||
|
|
||||||
$css-vars-use-native: true;
|
$css-vars-use-native: true;
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.tab-focus {
|
&.tab-focus {
|
||||||
@include tab-focus();
|
@include tab-focus;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
// Count bubble
|
// Count bubble
|
||||||
.button__count {
|
.button__count {
|
||||||
animation: fadein 0.2s ease;
|
animation: fade-in 0.2s ease;
|
||||||
background: $color-button-count-background;
|
background: $color-button-count-background;
|
||||||
color: $color-button-count-text;
|
color: $color-button-count-text;
|
||||||
margin-left: ($spacing-base * 0.75);
|
margin-left: ($spacing-base * 0.75);
|
||||||
|
@ -7,7 +7,7 @@ header {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
h1 span {
|
h1 span {
|
||||||
animation: shrinkHide 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2s forwards;
|
animation: shrink-hide 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2s forwards;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-weight: $font-weight-light;
|
font-weight: $font-weight-light;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// Make a <button> look like an <a>
|
// Make a <button> look like an <a>
|
||||||
button.faux-link {
|
button.faux-link {
|
||||||
@extend a; // stylelint-disable-line
|
@extend a; // stylelint-disable-line
|
||||||
@include cancel-button-styles();
|
@include cancel-button-styles;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Links
|
// Links
|
||||||
@ -39,7 +39,7 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.tab-focus {
|
&.tab-focus {
|
||||||
@include tab-focus();
|
@include tab-focus;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.no-border::after {
|
&.no-border::after {
|
||||||
|
@ -3,23 +3,26 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
// Fade
|
// Fade
|
||||||
@keyframes fadein {
|
@keyframes fade-in {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes shrinkHide {
|
@keyframes shrink-hide {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
width: 38px;
|
width: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
20% {
|
20% {
|
||||||
width: 45px;
|
width: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
font-family: 'Gordita';
|
font-family: Gordita;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: $font-weight-light;
|
font-weight: $font-weight-light;
|
||||||
src: url('https://cdn.plyr.io/static/fonts/gordita-light.woff2') format('woff2'),
|
src: url('https://cdn.plyr.io/static/fonts/gordita-light.woff2') format('woff2'),
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
font-family: 'Gordita';
|
font-family: Gordita;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: $font-weight-regular;
|
font-weight: $font-weight-regular;
|
||||||
src: url('https://cdn.plyr.io/static/fonts/gordita-regular.woff2') format('woff2'),
|
src: url('https://cdn.plyr.io/static/fonts/gordita-regular.woff2') format('woff2'),
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
font-family: 'Gordita';
|
font-family: Gordita;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: $font-weight-medium;
|
font-weight: $font-weight-medium;
|
||||||
src: url('https://cdn.plyr.io/static/fonts/gordita-medium.woff2') format('woff2'),
|
src: url('https://cdn.plyr.io/static/fonts/gordita-medium.woff2') format('woff2'),
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
font-family: 'Gordita';
|
font-family: Gordita;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: $font-weight-bold;
|
font-weight: $font-weight-bold;
|
||||||
src: url('https://cdn.plyr.io/static/fonts/gordita-bold.woff2') format('woff2'),
|
src: url('https://cdn.plyr.io/static/fonts/gordita-bold.woff2') format('woff2'),
|
||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
font-family: 'Gordita';
|
font-family: Gordita;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: $font-weight-black;
|
font-weight: $font-weight-black;
|
||||||
src: url('https://cdn.plyr.io/static/fonts/gordita-black.woff2') format('woff2'),
|
src: url('https://cdn.plyr.io/static/fonts/gordita-black.woff2') format('woff2'),
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
text-align: inherit;
|
text-align: inherit;
|
||||||
text-shadow: inherit;
|
text-shadow: inherit;
|
||||||
-moz-user-select: text; // stylelint-disable-line
|
user-select: text;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
17
demo/src/sass/lib/normalize.scss
vendored
17
demo/src/sass/lib/normalize.scss
vendored
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
line-height: 1.15; /* 1 */
|
line-height: 1.15; /* 1 */
|
||||||
-ms-text-size-adjust: 100%; /* 2 */
|
text-size-adjust: 100%; /* 2 */
|
||||||
-webkit-text-size-adjust: 100%; /* 2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sections
|
/* Sections
|
||||||
@ -89,7 +88,7 @@ hr {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
font-family: monospace, monospace; /* 1 */
|
font-family: monospace; /* 1 */
|
||||||
font-size: 1em; /* 2 */
|
font-size: 1em; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +102,7 @@ pre {
|
|||||||
|
|
||||||
a {
|
a {
|
||||||
background-color: transparent; /* 1 */
|
background-color: transparent; /* 1 */
|
||||||
-webkit-text-decoration-skip: objects; /* 2 */
|
text-decoration-skip: objects; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -112,7 +111,7 @@ a {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
abbr[title] {
|
abbr[title] {
|
||||||
border-bottom: none; /* 1 */
|
border-bottom: 0; /* 1 */
|
||||||
text-decoration: underline; /* 2 */
|
text-decoration: underline; /* 2 */
|
||||||
text-decoration: underline dotted; /* 2 */
|
text-decoration: underline dotted; /* 2 */
|
||||||
}
|
}
|
||||||
@ -281,7 +280,7 @@ button,
|
|||||||
html [type='button'],
|
html [type='button'],
|
||||||
[type='reset'],
|
[type='reset'],
|
||||||
[type='submit'] {
|
[type='submit'] {
|
||||||
-webkit-appearance: button; /* 2 */
|
appearance: button; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -375,7 +374,7 @@ textarea {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[type='search'] {
|
[type='search'] {
|
||||||
-webkit-appearance: textfield; /* 1 */
|
appearance: textfield; /* 1 */
|
||||||
outline-offset: -2px; /* 2 */
|
outline-offset: -2px; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +384,7 @@ textarea {
|
|||||||
|
|
||||||
[type='search']::-webkit-search-cancel-button,
|
[type='search']::-webkit-search-cancel-button,
|
||||||
[type='search']::-webkit-search-decoration {
|
[type='search']::-webkit-search-decoration {
|
||||||
-webkit-appearance: none;
|
appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -394,7 +393,7 @@ textarea {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
::-webkit-file-upload-button {
|
||||||
-webkit-appearance: button; /* 1 */
|
appearance: button; /* 1 */
|
||||||
font: inherit; /* 2 */
|
font: inherit; /* 2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
// Grayscale
|
// Grayscale
|
||||||
$color-gray-900: hsl(210, 15%, 16%);
|
$color-gray-900: hsl(210deg 15% 16%);
|
||||||
$color-gray-800: lighten($color-gray-900, 9%);
|
$color-gray-800: lighten($color-gray-900, 9%);
|
||||||
$color-gray-700: lighten($color-gray-800, 9%);
|
$color-gray-700: lighten($color-gray-800, 9%);
|
||||||
$color-gray-600: lighten($color-gray-700, 9%);
|
$color-gray-600: lighten($color-gray-700, 9%);
|
||||||
@ -15,7 +15,7 @@ $color-gray-100: lighten($color-gray-200, 9%);
|
|||||||
$color-gray-50: lighten($color-gray-100, 9%);
|
$color-gray-50: lighten($color-gray-100, 9%);
|
||||||
|
|
||||||
// Branding
|
// Branding
|
||||||
$color-brand-primary: hsl(198, 100%, 50%);
|
$color-brand-primary: hsl(198deg 100% 50%);
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
$color-text: $color-gray-700;
|
$color-text: $color-gray-700;
|
||||||
@ -28,13 +28,13 @@ $color-twitter: #4baaf4;
|
|||||||
$color-link: $color-brand-primary;
|
$color-link: $color-brand-primary;
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
$color-background-from: hsl(198, 100%, 94%);
|
$color-background-from: hsl(198deg 100% 94%);
|
||||||
$color-background-to: hsl(198, 100%, 98%);
|
$color-background-to: hsl(198deg 100% 98%);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
$color-button-background: $color-brand-primary;
|
$color-button-background: $color-brand-primary;
|
||||||
$color-button-text: #fff;
|
$color-button-text: #fff;
|
||||||
$color-button-background-hover: hsl(198, 100%, 55%);
|
$color-button-background-hover: hsl(198deg 100% 55%);
|
||||||
$color-button-count-background: #fff;
|
$color-button-count-background: #fff;
|
||||||
$color-button-count-text: $color-gray-600;
|
$color-button-count-text: $color-gray-600;
|
||||||
|
|
||||||
|
@ -4,18 +4,14 @@
|
|||||||
|
|
||||||
$font-sans-serif: 'Gordita', 'Avenir', 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
$font-sans-serif: 'Gordita', 'Avenir', 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
||||||
'Segoe UI Symbol';
|
'Segoe UI Symbol';
|
||||||
|
|
||||||
$font-size-base: 15;
|
$font-size-base: 15;
|
||||||
$font-size-small: 13;
|
$font-size-small: 13;
|
||||||
$font-size-large: 18;
|
$font-size-large: 18;
|
||||||
$font-size-h1: 64;
|
$font-size-h1: 64;
|
||||||
|
|
||||||
$font-weight-light: 300;
|
$font-weight-light: 300;
|
||||||
$font-weight-regular: 400;
|
$font-weight-regular: 400;
|
||||||
$font-weight-medium: 500;
|
$font-weight-medium: 500;
|
||||||
$font-weight-bold: 600;
|
$font-weight-bold: 600;
|
||||||
$font-weight-black: 900;
|
$font-weight-black: 900;
|
||||||
|
|
||||||
$line-height-base: 1.75;
|
$line-height-base: 1.75;
|
||||||
|
|
||||||
$letter-spacing-headings: -0.025em;
|
$letter-spacing-headings: -0.025em;
|
||||||
|
@ -8,8 +8,9 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@include font-smoothing();
|
@include font-smoothing;
|
||||||
@include font-size($font-size-base);
|
@include font-size($font-size-base);
|
||||||
|
|
||||||
color: $color-text;
|
color: $color-text;
|
||||||
font-family: $font-sans-serif;
|
font-family: $font-sans-serif;
|
||||||
font-weight: $font-weight-medium;
|
font-weight: $font-weight-medium;
|
||||||
@ -30,5 +31,6 @@ small {
|
|||||||
|
|
||||||
small {
|
small {
|
||||||
@include font-size($font-size-small);
|
@include font-size($font-size-small);
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@include font-size($font-size-h1);
|
@include font-size($font-size-h1);
|
||||||
|
|
||||||
color: $color-headings;
|
color: $color-headings;
|
||||||
font-weight: $font-weight-bold;
|
font-weight: $font-weight-bold;
|
||||||
letter-spacing: $letter-spacing-headings;
|
letter-spacing: $letter-spacing-headings;
|
||||||
|
60
package.json
60
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "3.6.9",
|
"version": "3.6.11",
|
||||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||||
"homepage": "https://plyr.io",
|
"homepage": "https://plyr.io",
|
||||||
"author": "Sam Potts <sam@potts.es>",
|
"author": "Sam Potts <sam@potts.es>",
|
||||||
@ -31,24 +31,24 @@
|
|||||||
"browserslist": "> 1%",
|
"browserslist": "> 1%",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"lint": "eslint src/js && npm run-script remark",
|
"lint": "eslint src/js && npm run remark && stylelint **/*.scss",
|
||||||
"lint:fix": "eslint --fix src/js",
|
"lint:fix": "eslint --fix src/js && stylelint **/*.scss --fix",
|
||||||
"remark": "remark -f --use 'validate-links=repository:\"sampotts/plyr\"' '{,!(node_modules),.?**/}*.md'",
|
"remark": "remark -f --use 'validate-links=repository:\"sampotts/plyr\"' '{,!(node_modules),.?**/}*.md'",
|
||||||
"deploy": "yarn lint && gulp version && gulp build && gulp deploy",
|
"deploy": "yarn lint && gulp version && gulp build && gulp deploy",
|
||||||
"format": "prettier --write \"./{src,demo/src}/**/*.{js,scss}\"",
|
"format": "prettier --write \"./{src,demo/src}/**/*.{js,scss}\"",
|
||||||
"start": "gulp"
|
"start": "gulp"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.13.15",
|
"@babel/core": "^7.16.5",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
"@babel/plugin-proposal-class-properties": "^7.16.5",
|
||||||
"@babel/preset-env": "^7.13.15",
|
"@babel/preset-env": "^7.16.5",
|
||||||
"@sampotts/eslint-config": "1.1.7",
|
"@sampotts/eslint-config": "1.1.7",
|
||||||
"autoprefixer": "^10.2.5",
|
"autoprefixer": "^10.4.0",
|
||||||
"aws-sdk": "^2.888.0",
|
"aws-sdk": "^2.1046.0",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"browser-sync": "^2.26.14",
|
"browser-sync": "^2.27.7",
|
||||||
"colorette": "2.0.12",
|
"colorette": "2.0.16",
|
||||||
"cssnano": "^5.0.1",
|
"cssnano": "^5.0.13",
|
||||||
"del": "^6.0.0",
|
"del": "^6.0.0",
|
||||||
"eslint": "^7.23.0",
|
"eslint": "^7.23.0",
|
||||||
"fancy-log": "^1.3.3",
|
"fancy-log": "^1.3.3",
|
||||||
@ -56,42 +56,40 @@
|
|||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-awspublish": "^4.1.2",
|
"gulp-awspublish": "^4.1.2",
|
||||||
"gulp-better-rollup": "^4.0.1",
|
"gulp-better-rollup": "^4.0.1",
|
||||||
"gulp-filter": "^6.0.0",
|
"gulp-filter": "^7.0.0",
|
||||||
"gulp-header": "^2.0.9",
|
"gulp-header": "^2.0.9",
|
||||||
"gulp-hub": "^4.2.0",
|
"gulp-hub": "^4.2.0",
|
||||||
"gulp-if": "^3.0.0",
|
"gulp-if": "^3.0.0",
|
||||||
"gulp-imagemin": "^7.1.0",
|
"gulp-imagemin": "^7.1.0",
|
||||||
"gulp-open": "^3.0.1",
|
"gulp-open": "^3.0.1",
|
||||||
"gulp-plumber": "^1.2.1",
|
"gulp-plumber": "^1.2.1",
|
||||||
"gulp-postcss": "^9.0.0",
|
"gulp-postcss": "^9.0.1",
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-replace": "^1.0.0",
|
"gulp-replace": "^1.1.3",
|
||||||
"gulp-sass": "^5.0.0",
|
"gulp-sass": "^5.0.0",
|
||||||
"gulp-size": "^3.0.0",
|
"gulp-size": "^4.0.1",
|
||||||
"gulp-sourcemaps": "^3.0.0",
|
"gulp-sourcemaps": "^3.0.0",
|
||||||
"gulp-svgstore": "^7.0.1",
|
"gulp-svgstore": "^9.0.0",
|
||||||
"gulp-terser": "^2.0.1",
|
"gulp-terser": "^2.1.0",
|
||||||
"postcss": "^8.2.10",
|
"postcss": "^8.4.5",
|
||||||
"postcss-custom-properties": "^11.0.0",
|
"postcss-custom-properties": "^12.0.1",
|
||||||
|
"postcss-scss": "^4.0.2",
|
||||||
"prettier-eslint": "^12.0.0",
|
"prettier-eslint": "^12.0.0",
|
||||||
"prettier-stylelint": "^0.4.2",
|
"prettier-stylelint": "^0.4.2",
|
||||||
"remark-cli": "^9.0.0",
|
"remark-cli": "^10.0.1",
|
||||||
"remark-validate-links": "^10.0.4",
|
"remark-validate-links": "^11.0.2",
|
||||||
"rollup": "^2.45.2",
|
"rollup": "^2.61.1",
|
||||||
"rollup-plugin-babel": "^4.4.0",
|
"rollup-plugin-babel": "^4.4.0",
|
||||||
"rollup-plugin-commonjs": "^10.1.0",
|
"rollup-plugin-commonjs": "^10.1.0",
|
||||||
"rollup-plugin-node-resolve": "^5.2.0",
|
"rollup-plugin-node-resolve": "^5.2.0",
|
||||||
"sass": "^1.42.1",
|
"sass": "^1.45.0",
|
||||||
"stylelint": "^13.12.0",
|
"stylelint": "^14.1.0",
|
||||||
"stylelint-config-prettier": "^8.0.2",
|
"stylelint-config-prettier": "^9.0.3",
|
||||||
"stylelint-config-recommended": "^4.0.0",
|
"stylelint-config-sass-guidelines": "^9.0.1",
|
||||||
"stylelint-config-sass-guidelines": "^8.0.0",
|
"stylelint-selector-bem-pattern": "^2.1.1"
|
||||||
"stylelint-order": "^4.1.0",
|
|
||||||
"stylelint-scss": "^3.19.0",
|
|
||||||
"stylelint-selector-bem-pattern": "^2.1.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.10.1",
|
"core-js": "^3.20.0",
|
||||||
"custom-event-polyfill": "^1.0.7",
|
"custom-event-polyfill": "^1.0.7",
|
||||||
"loadjs": "^4.2.0",
|
"loadjs": "^4.2.0",
|
||||||
"rangetouch": "^2.0.1",
|
"rangetouch": "^2.0.1",
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
// Linting
|
// Linting
|
||||||
"stylelint.enable": true,
|
"stylelint.enable": true,
|
||||||
|
"stylelint.validate": ["css", "scss"],
|
||||||
"css.validate": false,
|
"css.validate": false,
|
||||||
|
"less.validate": false,
|
||||||
"scss.validate": false,
|
"scss.validate": false,
|
||||||
"javascript.validate.enable": false,
|
"javascript.validate.enable": false,
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ const defaults = {
|
|||||||
// Sprite (for icons)
|
// Sprite (for icons)
|
||||||
loadSprite: true,
|
loadSprite: true,
|
||||||
iconPrefix: 'plyr',
|
iconPrefix: 'plyr',
|
||||||
iconUrl: 'https://cdn.plyr.io/3.6.9/plyr.svg',
|
iconUrl: 'https://cdn.plyr.io/3.6.11/plyr.svg',
|
||||||
|
|
||||||
// Blank video (used to prevent errors on source change)
|
// Blank video (used to prevent errors on source change)
|
||||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||||
|
@ -73,7 +73,7 @@ const html5 = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're using an an external handler...
|
// If we're using an external handler...
|
||||||
if (player.config.quality.forced && is.function(player.config.quality.onChange)) {
|
if (player.config.quality.forced && is.function(player.config.quality.onChange)) {
|
||||||
player.config.quality.onChange(input);
|
player.config.quality.onChange(input);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr
|
// Plyr
|
||||||
// plyr.js v3.6.9
|
// plyr.js v3.6.11
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr Polyfilled Build
|
// Plyr Polyfilled Build
|
||||||
// plyr.js v3.6.9
|
// plyr.js v3.6.11
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
// Base
|
// Base
|
||||||
.plyr {
|
.plyr {
|
||||||
@include plyr-font-smoothing($plyr-font-smoothing);
|
@include plyr-font-smoothing($plyr-font-smoothing);
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
// Tab focus
|
// Tab focus
|
||||||
&.plyr__tab-focus {
|
&.plyr__tab-focus {
|
||||||
@include plyr-tab-focus();
|
@include plyr-tab-focus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
.plyr [data-plyr='fullscreen'] {
|
.plyr [data-plyr='fullscreen'] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plyr--captions-enabled [data-plyr='captions'],
|
.plyr--captions-enabled [data-plyr='captions'],
|
||||||
.plyr--pip-supported [data-plyr='pip'],
|
.plyr--pip-supported [data-plyr='pip'],
|
||||||
.plyr--airplay-supported [data-plyr='airplay'],
|
.plyr--airplay-supported [data-plyr='airplay'],
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
.plyr__control svg {
|
.plyr__control svg {
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plyr__control[aria-expanded='true'] {
|
.plyr__control[aria-expanded='true'] {
|
||||||
svg {
|
svg {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
@ -73,10 +74,7 @@
|
|||||||
color: $plyr-menu-color;
|
color: $plyr-menu-color;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: $plyr-font-size-menu;
|
font-size: $plyr-font-size-menu;
|
||||||
padding-bottom: calc(#{$plyr-control-padding} / 1.5);
|
padding: calc(#{$plyr-control-padding} / 1.5) calc(#{$plyr-control-padding} * 1.5);
|
||||||
padding-left: calc(#{$plyr-control-padding} * 1.5);
|
|
||||||
padding-right: calc(#{$plyr-control-padding} * 1.5);
|
|
||||||
padding-top: calc(#{$plyr-control-padding} / 1.5);
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@ -176,6 +174,7 @@
|
|||||||
&::before {
|
&::before {
|
||||||
background: $plyr-control-toggle-checked-background;
|
background: $plyr-control-toggle-checked-background;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(-50%) scale(1);
|
transform: translateY(-50%) scale(1);
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
.plyr--full-ui input[type='range'] {
|
.plyr--full-ui input[type='range'] {
|
||||||
-webkit-appearance: none; /* stylelint-disable-line */
|
appearance: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: calc(#{$plyr-range-thumb-height} * 2);
|
border-radius: calc(#{$plyr-range-thumb-height} * 2);
|
||||||
|
|
||||||
// `color` property is used in JS to populate lower fill for WebKit
|
// `color` property is used in JS to populate lower fill for WebKit
|
||||||
color: $plyr-range-fill-background;
|
color: $plyr-range-fill-background;
|
||||||
display: block;
|
display: block;
|
||||||
@ -18,23 +19,25 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&::-webkit-slider-runnable-track {
|
&::-webkit-slider-runnable-track {
|
||||||
@include plyr-range-track();
|
@include plyr-range-track;
|
||||||
|
|
||||||
background-image: linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%));
|
background-image: linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%));
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-webkit-slider-thumb {
|
&::-webkit-slider-thumb {
|
||||||
@include plyr-range-thumb();
|
@include plyr-range-thumb;
|
||||||
-webkit-appearance: none; /* stylelint-disable-line */
|
|
||||||
|
appearance: none;
|
||||||
margin-top: calc(((#{$plyr-range-thumb-height} - #{$plyr-range-track-height}) / 2) * -1);
|
margin-top: calc(((#{$plyr-range-thumb-height} - #{$plyr-range-track-height}) / 2) * -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mozilla
|
// Mozilla
|
||||||
&::-moz-range-track {
|
&::-moz-range-track {
|
||||||
@include plyr-range-track();
|
@include plyr-range-track;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-moz-range-thumb {
|
&::-moz-range-thumb {
|
||||||
@include plyr-range-thumb();
|
@include plyr-range-thumb;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-moz-range-progress {
|
&::-moz-range-progress {
|
||||||
@ -45,22 +48,24 @@
|
|||||||
|
|
||||||
// Microsoft
|
// Microsoft
|
||||||
&::-ms-track {
|
&::-ms-track {
|
||||||
@include plyr-range-track();
|
@include plyr-range-track;
|
||||||
|
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-ms-fill-upper {
|
&::-ms-fill-upper {
|
||||||
@include plyr-range-track();
|
@include plyr-range-track;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-ms-fill-lower {
|
&::-ms-fill-lower {
|
||||||
@include plyr-range-track();
|
@include plyr-range-track;
|
||||||
|
|
||||||
background: currentColor;
|
background: currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-ms-thumb {
|
&::-ms-thumb {
|
||||||
@include plyr-range-thumb();
|
@include plyr-range-thumb;
|
||||||
|
|
||||||
// For some reason, Edge uses the -webkit margin above
|
// For some reason, Edge uses the -webkit margin above
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
@ -70,25 +75,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Focus styles
|
// Focus styles
|
||||||
&:focus {
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-moz-focus-outer {
|
&::-moz-focus-outer {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&.plyr__tab-focus {
|
&.plyr__tab-focus {
|
||||||
&::-webkit-slider-runnable-track {
|
&::-webkit-slider-runnable-track {
|
||||||
@include plyr-tab-focus();
|
@include plyr-tab-focus;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-moz-range-track {
|
&::-moz-range-track {
|
||||||
@include plyr-tab-focus();
|
@include plyr-tab-focus;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-ms-track {
|
&::-ms-track {
|
||||||
@include plyr-tab-focus();
|
@include plyr-tab-focus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* stylelint-disable selector-max-compound-selectors */
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Tooltips
|
// Tooltips
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
// Downloaded from https://github.com/malyw/css-vars (and modified)
|
// Downloaded from https://github.com/malyw/css-vars (and modified)
|
||||||
|
|
||||||
|
@use 'sass:list';
|
||||||
|
@use 'sass:map';
|
||||||
|
|
||||||
// global map to be filled via variables
|
// global map to be filled via variables
|
||||||
$css-vars: ();
|
$css-vars: ();
|
||||||
|
|
||||||
@ -21,36 +24,35 @@ $css-vars-use-native: false !default;
|
|||||||
|
|
||||||
///
|
///
|
||||||
// Emulates var() CSS native function behavior
|
// Emulates var() CSS native function behavior
|
||||||
//
|
|
||||||
// $args[0] {String} "--" + variable name
|
// $args[0] {String} "--" + variable name
|
||||||
// [$args[1]] Optional default value if variable is not assigned yet
|
// [$args[1]] Optional default value if variable is not assigned yet
|
||||||
//
|
|
||||||
// E.G.:
|
// E.G.:
|
||||||
// color: var(--main-color);
|
// color: var(--main-color);
|
||||||
// background: var(--main-background, green);
|
// background: var(--main-background, green);
|
||||||
///
|
///
|
||||||
@function var($args...) {
|
@function var($args...) {
|
||||||
// CHECK PARAMS
|
// CHECK PARAMS
|
||||||
@if (length($args) ==0) {
|
@if length($args) == 0 {
|
||||||
@error 'Variable name is expected to be passed to the var() function';
|
@error 'Variable name is expected to be passed to the var() function';
|
||||||
}
|
}
|
||||||
@if (str-length(nth($args, 1)) < 2 or str-slice(nth($args, 1), 0, 2) != '--') {
|
|
||||||
|
@if str-length(nth($args, 1)) < 2 or str-slice(nth($args, 1), 0, 2) != '--' {
|
||||||
@error "Variable name is expected to start from '--'";
|
@error "Variable name is expected to start from '--'";
|
||||||
}
|
}
|
||||||
|
|
||||||
// PROCESS
|
// PROCESS
|
||||||
$var-name: nth($args, 1);
|
$var-name: list.nth($args, 1);
|
||||||
$var-value: map-get($css-vars, $var-name);
|
$var-value: map.get($css-vars, $var-name);
|
||||||
|
|
||||||
@if ($css-vars-use-native) {
|
@if $css-vars-use-native {
|
||||||
// CSS variables
|
// CSS variables
|
||||||
// Native CSS: don't process function in case of native
|
// Native CSS: don't process function in case of native
|
||||||
@return unquote('var(' + $args + ')');
|
@return unquote('var(' + $args + ')');
|
||||||
} @else {
|
} @else {
|
||||||
@if ($var-value == null) {
|
@if not $var-value {
|
||||||
// variable is not provided so far
|
// variable is not provided so far
|
||||||
@if (length($args) == 2) {
|
@if length($args) == 2 {
|
||||||
$var-value: nth($args, 2);
|
$var-value: list.nth($args, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,20 +72,21 @@ $css-vars-use-native: false !default;
|
|||||||
///
|
///
|
||||||
@mixin css-vars($var-map: null) {
|
@mixin css-vars($var-map: null) {
|
||||||
// CHECK PARAMS
|
// CHECK PARAMS
|
||||||
@if ($var-map == null) {
|
@if not $var-map {
|
||||||
@error 'Map of variables is expected, instead got: null';
|
@error 'Map of variables is expected, instead got: null';
|
||||||
}
|
}
|
||||||
@if (type_of($var-map) != map) {
|
|
||||||
|
@if type_of($var-map) != map {
|
||||||
@error 'Map of variables is expected, instead got another type passed: #{type_of($var, ap)}';
|
@error 'Map of variables is expected, instead got another type passed: #{type_of($var, ap)}';
|
||||||
}
|
}
|
||||||
|
|
||||||
// PROCESS
|
// PROCESS
|
||||||
@if ($css-vars-use-native) {
|
@if $css-vars-use-native {
|
||||||
// CSS variables
|
// CSS variables
|
||||||
// Native CSS: assign CSS custom properties to the global scope
|
// Native CSS: assign CSS custom properties to the global scope
|
||||||
@at-root :root {
|
@at-root :root {
|
||||||
@each $var-name, $var-value in $var-map {
|
@each $var-name, $var-value in $var-map {
|
||||||
@if (type_of($var-value) == string) {
|
@if type_of($var-value) == string {
|
||||||
#{$var-name}: $var-value; // to prevent quotes interpolation
|
#{$var-name}: $var-value; // to prevent quotes interpolation
|
||||||
} @else {
|
} @else {
|
||||||
#{$var-name}: #{$var-value};
|
#{$var-name}: #{$var-value};
|
||||||
|
@ -5,10 +5,8 @@
|
|||||||
// Nicer focus styles
|
// Nicer focus styles
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
@mixin plyr-tab-focus($color: $plyr-tab-focus-color) {
|
@mixin plyr-tab-focus($color: $plyr-tab-focus-color) {
|
||||||
outline-color: $color;
|
outline: $color dotted 3px;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
outline-style: dotted;
|
|
||||||
outline-width: 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Font smoothing
|
// Font smoothing
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// Advertisements
|
// Advertisements
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
|
@use 'sass:math';
|
||||||
|
|
||||||
.plyr__ads {
|
.plyr__ads {
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -47,7 +49,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
height: $plyr-range-track-height;
|
height: $plyr-range-track-height;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin: -($plyr-range-track-height / 2) 0 0;
|
margin: -calc($plyr-range-track-height / 2) 0 0;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -4,15 +4,14 @@
|
|||||||
// TODO: Review use of BEM classnames
|
// TODO: Review use of BEM classnames
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
@charset 'UTF-8';
|
@charset 'UTF-8';
|
||||||
|
|
||||||
@import 'lib/css-vars';
|
@import 'lib/css-vars';
|
||||||
|
|
||||||
$css-vars-use-native: true;
|
$css-vars-use-native: true;
|
||||||
|
|
||||||
@import 'settings/breakpoints';
|
@import 'settings/breakpoints';
|
||||||
@import 'settings/colors';
|
@import 'settings/colors';
|
||||||
@import 'settings/cosmetics';
|
@import 'settings/cosmetics';
|
||||||
@import 'settings/type';
|
@import 'settings/type';
|
||||||
|
|
||||||
@import 'settings/badges';
|
@import 'settings/badges';
|
||||||
@import 'settings/captions';
|
@import 'settings/captions';
|
||||||
@import 'settings/controls';
|
@import 'settings/controls';
|
||||||
@ -21,13 +20,10 @@ $css-vars-use-native: true;
|
|||||||
@import 'settings/progress';
|
@import 'settings/progress';
|
||||||
@import 'settings/sliders';
|
@import 'settings/sliders';
|
||||||
@import 'settings/tooltips';
|
@import 'settings/tooltips';
|
||||||
|
|
||||||
@import 'lib/animation';
|
@import 'lib/animation';
|
||||||
@import 'lib/functions';
|
@import 'lib/functions';
|
||||||
@import 'lib/mixins';
|
@import 'lib/mixins';
|
||||||
|
|
||||||
@import 'base';
|
@import 'base';
|
||||||
|
|
||||||
@import 'components/badges';
|
@import 'components/badges';
|
||||||
@import 'components/captions';
|
@import 'components/captions';
|
||||||
@import 'components/control';
|
@import 'components/control';
|
||||||
@ -39,14 +35,10 @@ $css-vars-use-native: true;
|
|||||||
@import 'components/tooltips';
|
@import 'components/tooltips';
|
||||||
@import 'components/progress';
|
@import 'components/progress';
|
||||||
@import 'components/volume';
|
@import 'components/volume';
|
||||||
|
|
||||||
@import 'types/audio';
|
@import 'types/audio';
|
||||||
@import 'types/video';
|
@import 'types/video';
|
||||||
|
|
||||||
@import 'states/fullscreen';
|
@import 'states/fullscreen';
|
||||||
|
|
||||||
@import 'plugins/ads';
|
@import 'plugins/ads';
|
||||||
@import 'plugins/preview-thumbnails/index';
|
@import 'plugins/preview-thumbnails/index';
|
||||||
|
|
||||||
@import 'utils/animation';
|
@import 'utils/animation';
|
||||||
@import 'utils/hidden';
|
@import 'utils/hidden';
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
$plyr-captions-background: var(--plyr-captions-background, rgba(#000, 0.8)) !default;
|
$plyr-captions-background: var(--plyr-captions-background, rgba(#000, 0.8)) !default;
|
||||||
$plyr-captions-text-color: var(--plyr-captions-text-color, #fff) !default;
|
$plyr-captions-text-color: var(--plyr-captions-text-color, #fff) !default;
|
||||||
|
|
||||||
$plyr-font-size-captions-base: $plyr-font-size-base !default;
|
$plyr-font-size-captions-base: $plyr-font-size-base !default;
|
||||||
$plyr-font-size-captions-small: $plyr-font-size-small !default;
|
$plyr-font-size-captions-small: $plyr-font-size-small !default;
|
||||||
$plyr-font-size-captions-medium: $plyr-font-size-large !default;
|
$plyr-font-size-captions-medium: $plyr-font-size-large !default;
|
||||||
|
@ -2,17 +2,17 @@
|
|||||||
// Colors
|
// Colors
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
$plyr-color-main: var(--plyr-color-main, hsl(198, 100%, 50%)) !default;
|
$plyr-color-main: var(--plyr-color-main, hsl(198deg 100% 50%)) !default;
|
||||||
$plyr-video-background: var(--plyr-video-background, rgba(0,0,0,1)) !default;
|
$plyr-video-background: var(--plyr-video-background, rgb(0 0 0 / 100%)) !default;
|
||||||
|
|
||||||
// Grayscale
|
// Grayscale
|
||||||
$plyr-color-gray-900: hsl(216, 15%, 16%) !default;
|
$plyr-color-gray-900: hsl(216deg 15% 16%) !default;
|
||||||
$plyr-color-gray-800: hsl(216, 15%, 25%) !default;
|
$plyr-color-gray-800: hsl(216deg 15% 25%) !default;
|
||||||
$plyr-color-gray-700: hsl(216, 15%, 34%) !default;
|
$plyr-color-gray-700: hsl(216deg 15% 34%) !default;
|
||||||
$plyr-color-gray-600: hsl(216, 15%, 43%) !default;
|
$plyr-color-gray-600: hsl(216deg 15% 43%) !default;
|
||||||
$plyr-color-gray-500: hsl(216, 15%, 52%) !default;
|
$plyr-color-gray-500: hsl(216deg 15% 52%) !default;
|
||||||
$plyr-color-gray-400: hsl(216, 15%, 61%) !default;
|
$plyr-color-gray-400: hsl(216deg 15% 61%) !default;
|
||||||
$plyr-color-gray-300: hsl(216, 15%, 70%) !default;
|
$plyr-color-gray-300: hsl(216deg 15% 70%) !default;
|
||||||
$plyr-color-gray-200: hsl(216, 15%, 79%) !default;
|
$plyr-color-gray-200: hsl(216deg 15% 79%) !default;
|
||||||
$plyr-color-gray-100: hsl(216, 15%, 88%) !default;
|
$plyr-color-gray-100: hsl(216deg 15% 88%) !default;
|
||||||
$plyr-color-gray-50: hsl(216, 15%, 97%) !default;
|
$plyr-color-gray-50: hsl(216deg 15% 97%) !default;
|
||||||
|
@ -7,12 +7,10 @@ $plyr-control-spacing: var(--plyr-control-spacing, 10px) !default;
|
|||||||
$plyr-control-padding: calc(#{$plyr-control-spacing} * 0.7);
|
$plyr-control-padding: calc(#{$plyr-control-spacing} * 0.7);
|
||||||
$plyr-control-padding: var(--plyr-control-padding, $plyr-control-padding) !default;
|
$plyr-control-padding: var(--plyr-control-padding, $plyr-control-padding) !default;
|
||||||
$plyr-control-radius: var(--plyr-control-radius, 3px) !default;
|
$plyr-control-radius: var(--plyr-control-radius, 3px) !default;
|
||||||
|
|
||||||
$plyr-control-toggle-checked-background: var(
|
$plyr-control-toggle-checked-background: var(
|
||||||
--plyr-control-toggle-checked-background,
|
--plyr-control-toggle-checked-background,
|
||||||
var(--plyr-color-main, $plyr-color-main)
|
var(--plyr-color-main, $plyr-color-main)
|
||||||
) !default;
|
) !default;
|
||||||
|
|
||||||
$plyr-video-controls-background: var(
|
$plyr-video-controls-background: var(
|
||||||
--plyr-video-controls-background,
|
--plyr-video-controls-background,
|
||||||
linear-gradient(rgba(#000, 0), rgba(#000, 0.75))
|
linear-gradient(rgba(#000, 0), rgba(#000, 0.75))
|
||||||
@ -23,7 +21,6 @@ $plyr-video-control-background-hover: var(
|
|||||||
--plyr-video-control-background-hover,
|
--plyr-video-control-background-hover,
|
||||||
var(--plyr-color-main, $plyr-color-main)
|
var(--plyr-color-main, $plyr-color-main)
|
||||||
) !default;
|
) !default;
|
||||||
|
|
||||||
$plyr-audio-controls-background: var(--plyr-audio-controls-background, #fff) !default;
|
$plyr-audio-controls-background: var(--plyr-audio-controls-background, #fff) !default;
|
||||||
$plyr-audio-control-color: var(--plyr-audio-control-color, $plyr-color-gray-700) !default;
|
$plyr-audio-control-color: var(--plyr-audio-control-color, $plyr-color-gray-700) !default;
|
||||||
$plyr-audio-control-color-hover: var(--plyr-audio-control-color-hover, #fff) !default;
|
$plyr-audio-control-color-hover: var(--plyr-audio-control-color-hover, #fff) !default;
|
||||||
|
@ -7,9 +7,7 @@ $plyr-menu-radius: var(--plyr-menu-radius, 4px) !default;
|
|||||||
$plyr-menu-color: var(--plyr-menu-color, $plyr-color-gray-700) !default;
|
$plyr-menu-color: var(--plyr-menu-color, $plyr-color-gray-700) !default;
|
||||||
$plyr-menu-shadow: var(--plyr-menu-shadow, 0 1px 2px rgba(#000, 0.15)) !default;
|
$plyr-menu-shadow: var(--plyr-menu-shadow, 0 1px 2px rgba(#000, 0.15)) !default;
|
||||||
$plyr-menu-arrow-size: var(--plyr-menu-arrow-size, 4px) !default;
|
$plyr-menu-arrow-size: var(--plyr-menu-arrow-size, 4px) !default;
|
||||||
|
|
||||||
$plyr-menu-item-arrow-size: var(--plyr-menu-item-arrow-size, 4px) !default;
|
$plyr-menu-item-arrow-size: var(--plyr-menu-item-arrow-size, 4px) !default;
|
||||||
$plyr-menu-item-arrow-color: var(--plyr-menu-arrow-color, $plyr-color-gray-500) !default;
|
$plyr-menu-item-arrow-color: var(--plyr-menu-arrow-color, $plyr-color-gray-500) !default;
|
||||||
|
|
||||||
$plyr-menu-back-border-color: var(--plyr-menu-back-border-color, $plyr-color-gray-100) !default;
|
$plyr-menu-back-border-color: var(--plyr-menu-back-border-color, $plyr-color-gray-100) !default;
|
||||||
$plyr-menu-back-border-shadow-color: var(--plyr-menu-back-border-shadow-color, #fff) !default;
|
$plyr-menu-back-border-shadow-color: var(--plyr-menu-back-border-shadow-color, #fff) !default;
|
||||||
|
@ -29,7 +29,6 @@ $plyr-video-range-thumb-active-shadow-color: var(
|
|||||||
--plyr-audio-range-thumb-active-shadow-color,
|
--plyr-audio-range-thumb-active-shadow-color,
|
||||||
rgba(#fff, 0.5)
|
rgba(#fff, 0.5)
|
||||||
) !default;
|
) !default;
|
||||||
|
|
||||||
$plyr-audio-range-track-background: var(
|
$plyr-audio-range-track-background: var(
|
||||||
--plyr-audio-range-track-background,
|
--plyr-audio-range-track-background,
|
||||||
$plyr-audio-progress-buffered-background
|
$plyr-audio-progress-buffered-background
|
||||||
|
@ -7,14 +7,10 @@ $plyr-font-size-base: var(--plyr-font-size-base, 15px) !default;
|
|||||||
$plyr-font-size-small: var(--plyr-font-size-small, 13px) !default;
|
$plyr-font-size-small: var(--plyr-font-size-small, 13px) !default;
|
||||||
$plyr-font-size-large: var(--plyr-font-size-large, 18px) !default;
|
$plyr-font-size-large: var(--plyr-font-size-large, 18px) !default;
|
||||||
$plyr-font-size-xlarge: var(--plyr-font-size-xlarge, 21px) !default;
|
$plyr-font-size-xlarge: var(--plyr-font-size-xlarge, 21px) !default;
|
||||||
|
|
||||||
$plyr-font-size-time: var(--plyr-font-size-time, $plyr-font-size-small) !default;
|
$plyr-font-size-time: var(--plyr-font-size-time, $plyr-font-size-small) !default;
|
||||||
$plyr-font-size-menu: var(--plyr-font-size-menu, $plyr-font-size-small) !default;
|
$plyr-font-size-menu: var(--plyr-font-size-menu, $plyr-font-size-small) !default;
|
||||||
$plyr-font-size-badge: var(--plyr-font-size-badge, 9px) !default;
|
$plyr-font-size-badge: var(--plyr-font-size-badge, 9px) !default;
|
||||||
|
|
||||||
$plyr-font-weight-regular: var(--plyr-font-weight-regular, 400) !default;
|
$plyr-font-weight-regular: var(--plyr-font-weight-regular, 400) !default;
|
||||||
$plyr-font-weight-bold: var(--plyr-font-weight-bold, 600) !default;
|
$plyr-font-weight-bold: var(--plyr-font-weight-bold, 600) !default;
|
||||||
|
|
||||||
$plyr-line-height: var(--plyr-line-height, 1.7) !default;
|
$plyr-line-height: var(--plyr-line-height, 1.7) !default;
|
||||||
|
|
||||||
$plyr-font-smoothing: var(--plyr-font-smoothing, false) !default;
|
$plyr-font-smoothing: var(--plyr-font-smoothing, false) !default;
|
||||||
|
@ -3,27 +3,13 @@
|
|||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
.plyr:fullscreen {
|
.plyr:fullscreen {
|
||||||
@include plyr-fullscreen-active();
|
@include plyr-fullscreen-active;
|
||||||
}
|
|
||||||
|
|
||||||
/* stylelint-disable-next-line */
|
|
||||||
.plyr:-webkit-full-screen {
|
|
||||||
@include plyr-fullscreen-active();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stylelint-disable-next-line */
|
|
||||||
.plyr:-moz-full-screen {
|
|
||||||
@include plyr-fullscreen-active();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stylelint-disable-next-line */
|
|
||||||
.plyr:-ms-fullscreen {
|
|
||||||
@include plyr-fullscreen-active();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback for unsupported browsers
|
// Fallback for unsupported browsers
|
||||||
.plyr--fullscreen-fallback {
|
.plyr--fullscreen-fallback {
|
||||||
@include plyr-fullscreen-active();
|
@include plyr-fullscreen-active;
|
||||||
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: block;
|
display: block;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -51,6 +51,7 @@ $embed-padding: (math.div(100, 16) * 9);
|
|||||||
.plyr--full-ui .plyr__video-embed > .plyr__video-embed__container {
|
.plyr--full-ui .plyr__video-embed > .plyr__video-embed__container {
|
||||||
$height: 240;
|
$height: 240;
|
||||||
$offset: to-percentage(math.div($height - $embed-padding, math.div($height, 50)));
|
$offset: to-percentage(math.div($height - $embed-padding, math.div($height, 50)));
|
||||||
|
|
||||||
padding-bottom: to-percentage($height);
|
padding-bottom: to-percentage($height);
|
||||||
position: relative;
|
position: relative;
|
||||||
transform: translateY(-$offset);
|
transform: translateY(-$offset);
|
||||||
|
Reference in New Issue
Block a user