Added --plyr-video-background for having control over the background of a video with alpha channel (webm) or a poster image with alpha channel. (#2076)
This commit is contained in:
parent
16c134fc1e
commit
7750314058
@ -36,8 +36,8 @@ Please follow the instructions in our issue templates. Don't use github issues t
|
|||||||
You can use Gitpod (a free online VS Code-like IDE) for contributing. With a single click it will launch a workspace and automatically:
|
You can use Gitpod (a free online VS Code-like IDE) for contributing. With a single click it will launch a workspace and automatically:
|
||||||
|
|
||||||
- clone the plyr repo.
|
- clone the plyr repo.
|
||||||
- install the dependencies.
|
- install the dependencies with `yarn install` in root directory and "demo" directory.
|
||||||
- run `gulp` to the start the server.
|
- run `gulp` in root directory to start the dev server.
|
||||||
|
|
||||||
So that you can start straight away.
|
So that you can start straight away.
|
||||||
|
|
||||||
|
@ -185,6 +185,7 @@ Here's a list of the properties and what they are used for:
|
|||||||
| Name | Description | Default / Fallback |
|
| Name | Description | Default / Fallback |
|
||||||
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
||||||
| `--plyr-color-main` | The primary UI color. |  `#00b3ff` |
|
| `--plyr-color-main` | The primary UI color. |  `#00b3ff` |
|
||||||
|
| `--plyr-video-background` | The background color of video and poster wrappers for using alpha channel videos and poster images. | `rgba(0, 0, 0, 1)` |
|
||||||
| `--plyr-tab-focus-color` | The color used for the dotted outline when an element is `:focus-visible` (equivalent) keyboard focus. | `--plyr-color-main` |
|
| `--plyr-tab-focus-color` | The color used for the dotted outline when an element is `:focus-visible` (equivalent) keyboard focus. | `--plyr-color-main` |
|
||||||
| `--plyr-badge-background` | The background color for badges in the menu. |  `#4a5464` |
|
| `--plyr-badge-background` | The background color for badges in the menu. |  `#4a5464` |
|
||||||
| `--plyr-badge-text-color` | The text color for badges. |  `#ffffff` |
|
| `--plyr-badge-text-color` | The text color for badges. |  `#ffffff` |
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
.plyr__poster {
|
.plyr__poster {
|
||||||
background-color: #000;
|
background-color: var(--plyr-video-background, $plyr-video-background);
|
||||||
background-position: 50% 50%;
|
background-position: 50% 50%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
$plyr-color-main: var(--plyr-color-main, hsl(198, 100%, 50%)) !default;
|
$plyr-color-main: var(--plyr-color-main, hsl(198, 100%, 50%)) !default;
|
||||||
|
$plyr-video-background: var(--plyr-video-background, rgba(0,0,0,1)) !default;
|
||||||
|
|
||||||
// Grayscale
|
// Grayscale
|
||||||
$plyr-color-gray-900: hsl(216, 15%, 16%) !default;
|
$plyr-color-gray-900: hsl(216, 15%, 16%) !default;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// Container
|
// Container
|
||||||
.plyr--video {
|
.plyr--video {
|
||||||
background: #000;
|
background: var(--plyr-video-background, $plyr-video-background);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
&.plyr--menu-open {
|
&.plyr--menu-open {
|
||||||
@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.plyr__video-wrapper {
|
.plyr__video-wrapper {
|
||||||
background: #000;
|
background: var(--plyr-video-background, $plyr-video-background);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user