plyr-rails 0.1.4 → 2.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -1
- data/lib/plyr/rails.rb +21 -1
- data/lib/plyr/rails/version.rb +1 -1
- data/vendor/assets/javascripts/plyr.js +3775 -2
- data/vendor/assets/sprite/plyr-captions-off.svg +7 -0
- data/vendor/assets/sprite/plyr-captions-on.svg +7 -0
- data/vendor/assets/sprite/plyr-enter-fullscreen.svg +7 -0
- data/vendor/assets/sprite/plyr-exit-fullscreen.svg +7 -0
- data/vendor/assets/sprite/plyr-fast-forward.svg +6 -0
- data/vendor/assets/sprite/plyr-muted.svg +7 -0
- data/vendor/assets/sprite/plyr-pause.svg +7 -0
- data/vendor/assets/sprite/plyr-play.svg +6 -0
- data/vendor/assets/sprite/plyr-restart.svg +6 -0
- data/vendor/assets/sprite/plyr-rewind.svg +6 -0
- data/vendor/assets/sprite/plyr-volume.svg +8 -0
- data/vendor/assets/stylesheets/mixins.scss +29 -0
- data/vendor/assets/stylesheets/plyr.scss +758 -0
- data/vendor/assets/stylesheets/variables.scss +73 -0
- metadata +16 -4
- data/vendor/assets/images/plyr.svg +0 -1
- data/vendor/assets/stylesheets/plyr.css +0 -1
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
|
4
|
+
<g fill-rule="evenodd" fill-opacity="0.5">
|
5
|
+
<path d="M1,1 C0.4,1 0,1.4 0,2 L0,13 C0,13.6 0.4,14 1,14 L5.6,14 L8.3,16.7 C8.5,16.9 8.7,17 9,17 C9.3,17 9.5,16.9 9.7,16.7 L12.4,14 L17,14 C17.6,14 18,13.6 18,13 L18,2 C18,1.4 17.6,1 17,1 L1,1 Z M5.52,11.15 C7.51,11.15 8.53,9.83 8.8,8.74 L7.51,8.35 C7.32,9.01 6.73,9.8 5.52,9.8 C4.38,9.8 3.32,8.97 3.32,7.46 C3.32,5.85 4.44,5.09 5.5,5.09 C6.73,5.09 7.28,5.84 7.45,6.52 L8.75,6.11 C8.47,4.96 7.46,3.76 5.5,3.76 C3.6,3.76 1.89,5.2 1.89,7.46 C1.89,9.72 3.54,11.15 5.52,11.15 Z M13.09,11.15 C15.08,11.15 16.1,9.83 16.37,8.74 L15.08,8.35 C14.89,9.01 14.3,9.8 13.09,9.8 C11.95,9.8 10.89,8.97 10.89,7.46 C10.89,5.85 12.01,5.09 13.07,5.09 C14.3,5.09 14.85,5.84 15.02,6.52 L16.32,6.11 C16.04,4.96 15.03,3.76 13.07,3.76 C11.17,3.76 9.46,5.2 9.46,7.46 C9.46,9.72 11.11,11.15 13.09,11.15 Z"></path>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
|
4
|
+
<g fill-rule="evenodd">
|
5
|
+
<path d="M1,1 C0.4,1 0,1.4 0,2 L0,13 C0,13.6 0.4,14 1,14 L5.6,14 L8.3,16.7 C8.5,16.9 8.7,17 9,17 C9.3,17 9.5,16.9 9.7,16.7 L12.4,14 L17,14 C17.6,14 18,13.6 18,13 L18,2 C18,1.4 17.6,1 17,1 L1,1 Z M5.52,11.15 C7.51,11.15 8.53,9.83 8.8,8.74 L7.51,8.35 C7.32,9.01 6.73,9.8 5.52,9.8 C4.38,9.8 3.32,8.97 3.32,7.46 C3.32,5.85 4.44,5.09 5.5,5.09 C6.73,5.09 7.28,5.84 7.45,6.52 L8.75,6.11 C8.47,4.96 7.46,3.76 5.5,3.76 C3.6,3.76 1.89,5.2 1.89,7.46 C1.89,9.72 3.54,11.15 5.52,11.15 Z M13.09,11.15 C15.08,11.15 16.1,9.83 16.37,8.74 L15.08,8.35 C14.89,9.01 14.3,9.8 13.09,9.8 C11.95,9.8 10.89,8.97 10.89,7.46 C10.89,5.85 12.01,5.09 13.07,5.09 C14.3,5.09 14.85,5.84 15.02,6.52 L16.32,6.11 C16.04,4.96 15.03,3.76 13.07,3.76 C11.17,3.76 9.46,5.2 9.46,7.46 C9.46,9.72 11.11,11.15 13.09,11.15 Z"></path>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<polygon points="10 3 13.6 3 9.6 7 11 8.4 15 4.4 15 8 17 8 17 1 10 1"></polygon>
|
5
|
+
<polygon points="7 9.6 3 13.6 3 10 1 10 1 17 8 17 8 15 4.4 15 8.4 11"></polygon>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<polygon points="1 12 4.6 12 0.6 16 2 17.4 6 13.4 6 17 8 17 8 10 1 10"></polygon>
|
5
|
+
<polygon points="16 0.6 12 4.6 12 1 10 1 10 8 17 8 17 6 13.4 6 17.4 2"></polygon>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<polygon points="7.875 7.17142857 0 1 0 17 7.875 10.8285714 7.875 17 18 9 7.875 1"></polygon>
|
5
|
+
</g>
|
6
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<polygon points="12.4 12.5 14.5 10.4 16.6 12.5 18 11.1 15.9 9 18 6.9 16.6 5.5 14.5 7.6 12.4 5.5 11 6.9 13.1 9 11 11.1"></polygon>
|
5
|
+
<path d="M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z"></path>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<path d="M6,1 L3,1 C2.4,1 2,1.4 2,2 L2,16 C2,16.6 2.4,17 3,17 L6,17 C6.6,17 7,16.6 7,16 L7,2 C7,1.4 6.6,1 6,1 L6,1 Z"></path>
|
5
|
+
<path d="M12,1 C11.4,1 11,1.4 11,2 L11,16 C11,16.6 11.4,17 12,17 L15,17 C15.6,17 16,16.6 16,16 L16,2 C16,1.4 15.6,1 15,1 L12,1 Z"></path>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<path d="M15.5615866,8.10002147 L3.87056367,0.225209313 C3.05219207,-0.33727727 2,0.225209313 2,1.12518784 L2,16.8748122 C2,17.7747907 3.05219207,18.3372773 3.87056367,17.7747907 L15.5615866,9.89997853 C16.1461378,9.44998927 16.1461378,8.55001073 15.5615866,8.10002147 L15.5615866,8.10002147 Z"></path>
|
5
|
+
</g>
|
6
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<path d="M9.7,1.2 L10.4,7.6 L12.5,5.5 C14.4,7.4 14.4,10.6 12.5,12.5 C11.6,13.5 10.3,14 9,14 C7.7,14 6.4,13.5 5.5,12.5 C3.6,10.6 3.6,7.4 5.5,5.5 C6.1,4.9 6.9,4.4 7.8,4.2 L7.2,2.3 C6,2.6 4.9,3.2 4,4.1 C1.3,6.8 1.3,11.2 4,14 C5.3,15.3 7.1,16 8.9,16 C10.8,16 12.5,15.3 13.8,14 C16.5,11.3 16.5,6.9 13.8,4.1 L16,1.9 L9.7,1.2 L9.7,1.2 Z"></path>
|
5
|
+
</g>
|
6
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<polygon points="10.125 1 0 9 10.125 17 10.125 10.8285714 18 17 18 1 10.125 7.17142857"></polygon>
|
5
|
+
</g>
|
6
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g>
|
4
|
+
<path d="M15.5999996,3.3 C15.1999996,2.9 14.5999996,2.9 14.1999996,3.3 C13.7999996,3.7 13.7999996,4.3 14.1999996,4.7 C15.3999996,5.9 15.9999996,7.4 15.9999996,9 C15.9999996,10.6 15.3999996,12.1 14.1999996,13.3 C13.7999996,13.7 13.7999996,14.3 14.1999996,14.7 C14.3999996,14.9 14.6999996,15 14.8999996,15 C15.1999996,15 15.3999996,14.9 15.5999996,14.7 C17.0999996,13.2 17.9999996,11.2 17.9999996,9 C17.9999996,6.8 17.0999996,4.8 15.5999996,3.3 L15.5999996,3.3 Z"></path>
|
5
|
+
<path d="M11.2819745,5.28197449 C10.9060085,5.65794047 10.9060085,6.22188944 11.2819745,6.59785542 C12.0171538,7.33303477 12.2772954,8.05605449 12.2772954,9.00000021 C12.2772954,9.93588462 11.851678,10.9172014 11.2819745,11.4869049 C10.9060085,11.8628709 10.9060085,12.4268199 11.2819745,12.8027859 C11.4271642,12.9479755 11.9176724,13.0649528 12.2998149,12.9592565 C12.4124479,12.9281035 12.5156669,12.8776063 12.5978555,12.8027859 C13.773371,11.732654 14.1311161,10.1597914 14.1312523,9.00000021 C14.1312723,8.8299555 14.1286311,8.66015647 14.119665,8.4897429 C14.0674781,7.49784946 13.8010171,6.48513613 12.5978554,5.28197449 C12.2218894,4.9060085 11.6579405,4.9060085 11.2819745,5.28197449 Z"></path>
|
6
|
+
<path d="M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z"></path>
|
7
|
+
</g>
|
8
|
+
</svg>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Plyr mixins
|
3
|
+
// https://github.com/selz/plyr
|
4
|
+
// ==========================================================================
|
5
|
+
|
6
|
+
// <input type="range"> styling
|
7
|
+
@mixin plyr-range-track() {
|
8
|
+
height: $plyr-range-track-height;
|
9
|
+
background: transparent;
|
10
|
+
border: 0;
|
11
|
+
border-radius: ($plyr-range-track-height / 2);
|
12
|
+
user-select: none;
|
13
|
+
}
|
14
|
+
@mixin plyr-range-thumb() {
|
15
|
+
position: relative;
|
16
|
+
height: $plyr-range-thumb-height;
|
17
|
+
width: $plyr-range-thumb-width;
|
18
|
+
background: $plyr-range-thumb-bg;
|
19
|
+
border: $plyr-range-thumb-border;
|
20
|
+
border-radius: 100%;
|
21
|
+
transition: background .2s ease, border .2s ease, transform .2s ease;
|
22
|
+
box-shadow: $plyr-range-thumb-shadow;
|
23
|
+
box-sizing: border-box;
|
24
|
+
}
|
25
|
+
@mixin plyr-range-thumb-active() {
|
26
|
+
background: $plyr-range-thumb-active-bg;
|
27
|
+
border-color: $plyr-range-thumb-active-border-color;
|
28
|
+
transform: scale($plyr-range-thumb-active-scale);
|
29
|
+
}
|
@@ -0,0 +1,758 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Plyr styles
|
3
|
+
// https://github.com/selz/plyr
|
4
|
+
// ==========================================================================
|
5
|
+
|
6
|
+
@import "variables";
|
7
|
+
@import "mixins";
|
8
|
+
|
9
|
+
// Animation
|
10
|
+
// ---------------------------------------
|
11
|
+
@keyframes plyr-progress {
|
12
|
+
to { background-position: $plyr-progress-loading-size 0; }
|
13
|
+
}
|
14
|
+
|
15
|
+
// Styles
|
16
|
+
// -------------------------------
|
17
|
+
// Base
|
18
|
+
.plyr {
|
19
|
+
position: relative;
|
20
|
+
max-width: 100%;
|
21
|
+
min-width: 200px;
|
22
|
+
font-family: $plyr-font-family;
|
23
|
+
direction: ltr;
|
24
|
+
|
25
|
+
@if $plyr-border-box == true {
|
26
|
+
// border-box everything
|
27
|
+
// http://paulirish.com/2012/box-sizing-border-box-ftw/
|
28
|
+
&,
|
29
|
+
*,
|
30
|
+
*::after,
|
31
|
+
*::before {
|
32
|
+
box-sizing: border-box;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
@if $plyr-touch-action == true {
|
37
|
+
// Fix 300ms delay
|
38
|
+
a, button, input, label {
|
39
|
+
touch-action: manipulation;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
// Focus
|
44
|
+
&:focus {
|
45
|
+
outline: 0;
|
46
|
+
}
|
47
|
+
|
48
|
+
// Media elements
|
49
|
+
video,
|
50
|
+
audio {
|
51
|
+
width: 100%;
|
52
|
+
height: auto;
|
53
|
+
vertical-align: middle;
|
54
|
+
border-radius: inherit;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Range inputs
|
58
|
+
// Specificity is for bootstrap compatibility
|
59
|
+
input[type='range'] {
|
60
|
+
display: block;
|
61
|
+
height: ($plyr-range-thumb-height * $plyr-range-thumb-active-scale);
|
62
|
+
width: 100%;
|
63
|
+
margin: 0;
|
64
|
+
padding: 0;
|
65
|
+
vertical-align: middle;
|
66
|
+
|
67
|
+
appearance: none;
|
68
|
+
cursor: pointer;
|
69
|
+
border: none;
|
70
|
+
background: transparent;
|
71
|
+
|
72
|
+
// WebKit
|
73
|
+
&::-webkit-slider-runnable-track {
|
74
|
+
@include plyr-range-track();
|
75
|
+
}
|
76
|
+
&::-webkit-slider-thumb {
|
77
|
+
-webkit-appearance: none;
|
78
|
+
margin-top: -(($plyr-range-thumb-height - $plyr-range-track-height) / 2);
|
79
|
+
@include plyr-range-thumb();
|
80
|
+
}
|
81
|
+
|
82
|
+
// Mozilla
|
83
|
+
&::-moz-range-track {
|
84
|
+
@include plyr-range-track();
|
85
|
+
}
|
86
|
+
&::-moz-range-thumb {
|
87
|
+
@include plyr-range-thumb();
|
88
|
+
}
|
89
|
+
|
90
|
+
// Microsoft
|
91
|
+
&::-ms-track {
|
92
|
+
height: $plyr-range-track-height;
|
93
|
+
background: transparent;
|
94
|
+
border: 0;
|
95
|
+
color: transparent;
|
96
|
+
}
|
97
|
+
&::-ms-fill-upper {
|
98
|
+
@include plyr-range-track();
|
99
|
+
}
|
100
|
+
&::-ms-fill-lower {
|
101
|
+
@include plyr-range-track();
|
102
|
+
background: $plyr-range-selected-bg;
|
103
|
+
}
|
104
|
+
&::-ms-thumb {
|
105
|
+
@include plyr-range-thumb();
|
106
|
+
// For some reason, Edge uses the -webkit margin above
|
107
|
+
margin-top: 0;
|
108
|
+
}
|
109
|
+
&::-ms-tooltip {
|
110
|
+
display: none;
|
111
|
+
}
|
112
|
+
|
113
|
+
// Focus styles
|
114
|
+
&:focus {
|
115
|
+
outline: 0;
|
116
|
+
}
|
117
|
+
&::-moz-focus-outer {
|
118
|
+
border: 0;
|
119
|
+
}
|
120
|
+
&.tab-focus:focus {
|
121
|
+
outline-offset: 3px;
|
122
|
+
}
|
123
|
+
|
124
|
+
// Pressed styles
|
125
|
+
&:active {
|
126
|
+
&::-webkit-slider-thumb {
|
127
|
+
@include plyr-range-thumb-active();
|
128
|
+
}
|
129
|
+
&::-moz-range-thumb {
|
130
|
+
@include plyr-range-thumb-active();
|
131
|
+
}
|
132
|
+
&::-ms-thumb {
|
133
|
+
@include plyr-range-thumb-active();
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
// Video range inputs
|
140
|
+
.plyr--video input[type='range'].tab-focus:focus {
|
141
|
+
outline: 1px dotted transparentize($plyr-video-control-color, .5);
|
142
|
+
}
|
143
|
+
|
144
|
+
// Audio range inputs
|
145
|
+
.plyr--audio input[type='range'].tab-focus:focus {
|
146
|
+
outline: 1px dotted transparentize($plyr-audio-control-color, .5);
|
147
|
+
}
|
148
|
+
|
149
|
+
// Screen reader only elements
|
150
|
+
.plyr__sr-only {
|
151
|
+
clip: rect(1px, 1px, 1px, 1px);
|
152
|
+
overflow: hidden;
|
153
|
+
|
154
|
+
// !important is not always needed
|
155
|
+
@if $plyr-sr-only-important == true {
|
156
|
+
position: absolute !important;
|
157
|
+
padding: 0 !important;
|
158
|
+
border: 0 !important;
|
159
|
+
height: 1px !important;
|
160
|
+
width: 1px !important;
|
161
|
+
} @else {
|
162
|
+
position: absolute;
|
163
|
+
padding: 0;
|
164
|
+
border: 0;
|
165
|
+
height: 1px;
|
166
|
+
width: 1px;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
// Video
|
171
|
+
.plyr__video-wrapper {
|
172
|
+
position: relative;
|
173
|
+
background: #000;
|
174
|
+
border-radius: inherit;
|
175
|
+
}
|
176
|
+
|
177
|
+
// Container for embeds
|
178
|
+
.plyr__video-embed {
|
179
|
+
padding-bottom: 56.25%; /* 16:9 */
|
180
|
+
height: 0;
|
181
|
+
border-radius: inherit;
|
182
|
+
|
183
|
+
// Require overflow and z-index to force border-radius
|
184
|
+
overflow: hidden;
|
185
|
+
z-index: 0;
|
186
|
+
|
187
|
+
iframe {
|
188
|
+
position: absolute;
|
189
|
+
top: 0;
|
190
|
+
left: 0;
|
191
|
+
width: 100%;
|
192
|
+
height: 100%;
|
193
|
+
border: 0;
|
194
|
+
user-select: none;
|
195
|
+
}
|
196
|
+
|
197
|
+
// Vimeo hack
|
198
|
+
> div {
|
199
|
+
position: relative;
|
200
|
+
padding-bottom: 200%;
|
201
|
+
transform: translateY(-35.95%);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
// To allow mouse events to be captured if full support
|
205
|
+
.plyr .plyr__video-embed iframe {
|
206
|
+
pointer-events: none;
|
207
|
+
}
|
208
|
+
|
209
|
+
// Captions
|
210
|
+
// --------------------------------------------------------------
|
211
|
+
// Hide default captions
|
212
|
+
.plyr video::-webkit-media-text-track-container {
|
213
|
+
display: none;
|
214
|
+
}
|
215
|
+
.plyr__captions {
|
216
|
+
display: none;
|
217
|
+
position: absolute;
|
218
|
+
bottom: 0;
|
219
|
+
left: 0;
|
220
|
+
width: 100%;
|
221
|
+
padding: ($plyr-control-spacing * 2);
|
222
|
+
transform: translateY(-($plyr-control-spacing * 6));
|
223
|
+
transition: transform .3s ease;
|
224
|
+
color: $plyr-captions-color;
|
225
|
+
font-size: $plyr-font-size-captions-base;
|
226
|
+
text-align: center;
|
227
|
+
font-weight: 400;
|
228
|
+
|
229
|
+
span {
|
230
|
+
border-radius: 2px;
|
231
|
+
padding: floor($plyr-control-spacing / 3) $plyr-control-spacing;
|
232
|
+
background: $plyr-captions-bg;
|
233
|
+
box-decoration-break: clone;
|
234
|
+
line-height: 150%;
|
235
|
+
}
|
236
|
+
span:empty {
|
237
|
+
display: none;
|
238
|
+
}
|
239
|
+
|
240
|
+
@media (min-width: $plyr-bp-screen-md) {
|
241
|
+
font-size: $plyr-font-size-captions-medium;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
.plyr--captions-active .plyr__captions {
|
245
|
+
display: block;
|
246
|
+
}
|
247
|
+
.plyr--hide-controls .plyr__captions {
|
248
|
+
transform: translateY(-($plyr-control-spacing * 2));
|
249
|
+
}
|
250
|
+
// Large captions in full screen on larger screens
|
251
|
+
@media (min-width: $plyr-bp-screen-lg) {
|
252
|
+
.plyr--fullscreen-active .plyr__captions {
|
253
|
+
font-size: $plyr-font-size-captions-large;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
|
257
|
+
// Controls
|
258
|
+
// --------------------------------------------------------------
|
259
|
+
// Hide native controls
|
260
|
+
.plyr ::-webkit-media-controls {
|
261
|
+
display: none;
|
262
|
+
}
|
263
|
+
|
264
|
+
// Playback controls
|
265
|
+
.plyr__controls {
|
266
|
+
display: flex;
|
267
|
+
align-items: center;
|
268
|
+
line-height: 1;
|
269
|
+
text-align: center;
|
270
|
+
|
271
|
+
// Spacing
|
272
|
+
> button,
|
273
|
+
.plyr__progress,
|
274
|
+
.plyr__time {
|
275
|
+
margin-left: ($plyr-control-spacing / 2);
|
276
|
+
|
277
|
+
&:first-child {
|
278
|
+
margin-left: 0;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
.plyr__volume {
|
282
|
+
margin-left: ($plyr-control-spacing / 2);
|
283
|
+
}
|
284
|
+
[data-plyr="pause"] {
|
285
|
+
margin-left: 0;
|
286
|
+
}
|
287
|
+
|
288
|
+
// Buttons
|
289
|
+
button {
|
290
|
+
position: relative;
|
291
|
+
display: inline-block;
|
292
|
+
flex-shrink: 0;
|
293
|
+
overflow: visible; // IE11
|
294
|
+
vertical-align: middle;
|
295
|
+
padding: ($plyr-control-spacing * .7);
|
296
|
+
border: 0;
|
297
|
+
background: transparent;
|
298
|
+
border-radius: 3px;
|
299
|
+
cursor: pointer;
|
300
|
+
transition: background .3s ease, color .3s ease, opacity .3s ease;
|
301
|
+
color: inherit;
|
302
|
+
|
303
|
+
svg {
|
304
|
+
width: $plyr-control-icon-size;
|
305
|
+
height: $plyr-control-icon-size;
|
306
|
+
display: block;
|
307
|
+
fill: currentColor;
|
308
|
+
}
|
309
|
+
|
310
|
+
// Default focus
|
311
|
+
&:focus {
|
312
|
+
outline: 0;
|
313
|
+
}
|
314
|
+
}
|
315
|
+
|
316
|
+
// Hide toggle icons by default
|
317
|
+
.icon--exit-fullscreen,
|
318
|
+
.icon--muted,
|
319
|
+
.icon--captions-on {
|
320
|
+
display: none;
|
321
|
+
}
|
322
|
+
|
323
|
+
@media (min-width: $plyr-bp-screen-sm) {
|
324
|
+
> button,
|
325
|
+
.plyr__progress,
|
326
|
+
.plyr__time {
|
327
|
+
margin-left: $plyr-control-spacing;
|
328
|
+
}
|
329
|
+
}
|
330
|
+
}
|
331
|
+
// Hide controls
|
332
|
+
.plyr--hide-controls .plyr__controls {
|
333
|
+
opacity: 0;
|
334
|
+
pointer-events: none;
|
335
|
+
}
|
336
|
+
|
337
|
+
// Video controls
|
338
|
+
.plyr--video .plyr__controls {
|
339
|
+
position: absolute;
|
340
|
+
left: 0;
|
341
|
+
right: 0;
|
342
|
+
bottom: 0;
|
343
|
+
padding: ($plyr-control-spacing * 5) $plyr-control-spacing $plyr-control-spacing;
|
344
|
+
background: linear-gradient(transparentize($plyr-video-controls-bg, 1), transparentize($plyr-video-controls-bg, .5));
|
345
|
+
border-bottom-left-radius: inherit;
|
346
|
+
border-bottom-right-radius: inherit;
|
347
|
+
color: $plyr-video-control-color;
|
348
|
+
transition: opacity .3s ease;
|
349
|
+
|
350
|
+
button {
|
351
|
+
// Hover and tab focus
|
352
|
+
&.tab-focus:focus,
|
353
|
+
&:hover {
|
354
|
+
background: $plyr-video-control-bg-hover;
|
355
|
+
color: $plyr-video-control-color-hover;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
|
360
|
+
// Audio controls
|
361
|
+
.plyr--audio .plyr__controls {
|
362
|
+
padding: $plyr-control-spacing;
|
363
|
+
border-radius: inherit;
|
364
|
+
background: $plyr-audio-controls-bg;
|
365
|
+
border: $plyr-audio-controls-border;
|
366
|
+
color: $plyr-audio-control-color;
|
367
|
+
|
368
|
+
button {
|
369
|
+
// Hover and tab focus
|
370
|
+
&.tab-focus:focus,
|
371
|
+
&:hover {
|
372
|
+
background: $plyr-audio-control-bg-hover;
|
373
|
+
color: $plyr-audio-control-color-hover;
|
374
|
+
}
|
375
|
+
}
|
376
|
+
}
|
377
|
+
|
378
|
+
// Large play button (video only)
|
379
|
+
.plyr__play-large {
|
380
|
+
display: none;
|
381
|
+
position: absolute;
|
382
|
+
z-index: 1;
|
383
|
+
top: 50%;
|
384
|
+
left: 50%;
|
385
|
+
transform: translate(-50%, -50%);
|
386
|
+
padding: $plyr-control-spacing;
|
387
|
+
background: $plyr-video-control-bg-hover;
|
388
|
+
border: 4px solid currentColor;
|
389
|
+
border-radius: 100%;
|
390
|
+
box-shadow: 0 1px 1px transparentize(#000, .85);
|
391
|
+
color: $plyr-video-control-color;
|
392
|
+
transition: all .3s ease;
|
393
|
+
|
394
|
+
svg {
|
395
|
+
position: relative;
|
396
|
+
left: 2px;
|
397
|
+
width: 20px;
|
398
|
+
height: 20px;
|
399
|
+
display: block;
|
400
|
+
fill: currentColor;
|
401
|
+
}
|
402
|
+
|
403
|
+
&:focus {
|
404
|
+
outline: 1px dotted transparentize($plyr-video-control-color, .5);
|
405
|
+
}
|
406
|
+
}
|
407
|
+
.plyr .plyr__play-large {
|
408
|
+
display: inline-block;
|
409
|
+
}
|
410
|
+
.plyr--audio .plyr__play-large {
|
411
|
+
display: none;
|
412
|
+
}
|
413
|
+
.plyr--playing .plyr__play-large {
|
414
|
+
opacity: 0;
|
415
|
+
visibility: hidden;
|
416
|
+
}
|
417
|
+
|
418
|
+
// States
|
419
|
+
.plyr__controls [data-plyr='pause'],
|
420
|
+
.plyr--playing .plyr__controls [data-plyr='play'] {
|
421
|
+
display: none;
|
422
|
+
}
|
423
|
+
.plyr--playing .plyr__controls [data-plyr='pause'] {
|
424
|
+
display: inline-block;
|
425
|
+
}
|
426
|
+
|
427
|
+
// Change icons on state change
|
428
|
+
.plyr--fullscreen-active .icon--exit-fullscreen,
|
429
|
+
.plyr--muted .plyr__controls .icon--muted,
|
430
|
+
.plyr--captions-active .plyr__controls .icon--captions-on {
|
431
|
+
display: block;
|
432
|
+
|
433
|
+
& + svg {
|
434
|
+
display: none;
|
435
|
+
}
|
436
|
+
}
|
437
|
+
|
438
|
+
// Some options are hidden by default
|
439
|
+
.plyr [data-plyr='captions'],
|
440
|
+
.plyr [data-plyr='fullscreen'] {
|
441
|
+
display: none;
|
442
|
+
}
|
443
|
+
.plyr--captions-enabled [data-plyr='captions'],
|
444
|
+
.plyr--fullscreen-enabled [data-plyr='fullscreen'] {
|
445
|
+
display: inline-block;
|
446
|
+
}
|
447
|
+
|
448
|
+
// Tooltips
|
449
|
+
// --------------------------------------------------------------
|
450
|
+
.plyr__tooltip {
|
451
|
+
position: absolute;
|
452
|
+
z-index: 2;
|
453
|
+
bottom: 100%;
|
454
|
+
margin-bottom: ($plyr-tooltip-padding * 2);
|
455
|
+
padding: $plyr-tooltip-padding ($plyr-tooltip-padding * 1.5);
|
456
|
+
pointer-events: none;
|
457
|
+
|
458
|
+
opacity: 0;
|
459
|
+
background: $plyr-tooltip-bg;
|
460
|
+
border-radius: $plyr-tooltip-radius;
|
461
|
+
|
462
|
+
color: $plyr-tooltip-color;
|
463
|
+
font-size: $plyr-font-size-small;
|
464
|
+
line-height: 1.3;
|
465
|
+
|
466
|
+
transform: translate(-50%, 10px) scale(.8);
|
467
|
+
transform-origin: 50% 100%;
|
468
|
+
transition: transform .2s .1s ease, opacity .2s .1s ease;
|
469
|
+
|
470
|
+
&::before {
|
471
|
+
// Arrows
|
472
|
+
content: '';
|
473
|
+
position: absolute;
|
474
|
+
width: 0;
|
475
|
+
height: 0;
|
476
|
+
left: 50%;
|
477
|
+
transform: translateX(-50%);
|
478
|
+
|
479
|
+
// The background triangle
|
480
|
+
bottom: -$plyr-tooltip-arrow-size;
|
481
|
+
border-right: $plyr-tooltip-arrow-size solid transparent;
|
482
|
+
border-top: $plyr-tooltip-arrow-size solid $plyr-tooltip-bg;
|
483
|
+
border-left: $plyr-tooltip-arrow-size solid transparent;
|
484
|
+
z-index: 2;
|
485
|
+
}
|
486
|
+
}
|
487
|
+
.plyr button:hover .plyr__tooltip,
|
488
|
+
.plyr button.tab-focus:focus .plyr__tooltip,
|
489
|
+
.plyr__tooltip--visible {
|
490
|
+
opacity: 1;
|
491
|
+
transform: translate(-50%, 0) scale(1);
|
492
|
+
}
|
493
|
+
.plyr button:hover .plyr__tooltip {
|
494
|
+
z-index: 3;
|
495
|
+
}
|
496
|
+
|
497
|
+
// First tooltip
|
498
|
+
.plyr__controls button:first-child .plyr__tooltip {
|
499
|
+
left: 0;
|
500
|
+
transform: translate(0, 10px) scale(.8);
|
501
|
+
transform-origin: 0 100%;
|
502
|
+
|
503
|
+
&::before {
|
504
|
+
left: ($plyr-control-icon-size / 2) + $plyr-control-padding;
|
505
|
+
}
|
506
|
+
}
|
507
|
+
|
508
|
+
// Last tooltip
|
509
|
+
.plyr__controls button:last-child .plyr__tooltip {
|
510
|
+
right: 0;
|
511
|
+
transform: translate(0, 10px) scale(.8);
|
512
|
+
transform-origin: 100% 100%;
|
513
|
+
|
514
|
+
&::before {
|
515
|
+
left: auto;
|
516
|
+
right: ($plyr-control-icon-size / 2) + $plyr-control-padding;
|
517
|
+
transform: translateX(50%);
|
518
|
+
}
|
519
|
+
}
|
520
|
+
|
521
|
+
.plyr__controls button:first-child,
|
522
|
+
.plyr__controls button:last-child {
|
523
|
+
&:hover .plyr__tooltip,
|
524
|
+
&.tab-focus:focus .plyr__tooltip,
|
525
|
+
.plyr__tooltip--visible {
|
526
|
+
transform: translate(0, 0) scale(1);
|
527
|
+
}
|
528
|
+
}
|
529
|
+
|
530
|
+
// Playback progress
|
531
|
+
// --------------------------------------------------------------
|
532
|
+
// <progress> element
|
533
|
+
.plyr__progress {
|
534
|
+
display: none;
|
535
|
+
position: relative;
|
536
|
+
flex: 1;
|
537
|
+
|
538
|
+
input[type="range"] {
|
539
|
+
position: relative;
|
540
|
+
z-index: 2;
|
541
|
+
|
542
|
+
&::-webkit-slider-runnable-track {
|
543
|
+
background: transparent;
|
544
|
+
}
|
545
|
+
&::-moz-range-track {
|
546
|
+
background: transparent;
|
547
|
+
}
|
548
|
+
&::-ms-fill-upper {
|
549
|
+
background: transparent;
|
550
|
+
}
|
551
|
+
}
|
552
|
+
|
553
|
+
// Seek tooltip to show time
|
554
|
+
.plyr__tooltip {
|
555
|
+
left: 0;
|
556
|
+
}
|
557
|
+
}
|
558
|
+
.plyr .plyr__progress {
|
559
|
+
display: inline-block;
|
560
|
+
}
|
561
|
+
|
562
|
+
.plyr__progress--buffer,
|
563
|
+
.plyr__progress--played,
|
564
|
+
.plyr__volume--display {
|
565
|
+
position: absolute;
|
566
|
+
left: 0;
|
567
|
+
top: 50%;
|
568
|
+
width: 100%;
|
569
|
+
height: $plyr-range-track-height;
|
570
|
+
margin: -($plyr-range-track-height / 2) 0 0;
|
571
|
+
padding: 0;
|
572
|
+
vertical-align: top;
|
573
|
+
appearance: none;
|
574
|
+
border: none;
|
575
|
+
border-radius: 100px;
|
576
|
+
|
577
|
+
&::-webkit-progress-bar {
|
578
|
+
background: transparent;
|
579
|
+
}
|
580
|
+
&::-webkit-progress-value {
|
581
|
+
background: currentColor;
|
582
|
+
border-radius: 100px;
|
583
|
+
min-width: $plyr-range-track-height;
|
584
|
+
}
|
585
|
+
&::-moz-progress-bar {
|
586
|
+
background: currentColor;
|
587
|
+
border-radius: 100px;
|
588
|
+
min-width: $plyr-range-track-height;
|
589
|
+
}
|
590
|
+
&::-ms-fill {
|
591
|
+
border-radius: 100px;
|
592
|
+
}
|
593
|
+
}
|
594
|
+
.plyr__progress--played,
|
595
|
+
.plyr__volume--display {
|
596
|
+
z-index: 1;
|
597
|
+
color: $plyr-range-selected-bg;
|
598
|
+
background: transparent;
|
599
|
+
transition: none;
|
600
|
+
|
601
|
+
&::-webkit-progress-value {
|
602
|
+
min-width: $plyr-range-track-height;
|
603
|
+
max-width: 99%;
|
604
|
+
border-top-right-radius: 0;
|
605
|
+
border-bottom-right-radius: 0;
|
606
|
+
transition: none;
|
607
|
+
}
|
608
|
+
&::-moz-progress-bar {
|
609
|
+
min-width: $plyr-range-track-height;
|
610
|
+
max-width: 99%;
|
611
|
+
border-top-right-radius: 0;
|
612
|
+
border-bottom-right-radius: 0;
|
613
|
+
transition: none;
|
614
|
+
}
|
615
|
+
&::-ms-fill {
|
616
|
+
display: none;
|
617
|
+
}
|
618
|
+
}
|
619
|
+
.plyr__progress--buffer {
|
620
|
+
&::-webkit-progress-value {
|
621
|
+
transition: width .2s ease;
|
622
|
+
}
|
623
|
+
&::-moz-progress-bar {
|
624
|
+
transition: width .2s ease;
|
625
|
+
}
|
626
|
+
&::-ms-fill {
|
627
|
+
transition: width .2s ease;
|
628
|
+
}
|
629
|
+
}
|
630
|
+
.plyr--video .plyr__progress--buffer,
|
631
|
+
.plyr--video .plyr__volume--display {
|
632
|
+
background: $plyr-video-range-track-bg;
|
633
|
+
}
|
634
|
+
.plyr--video .plyr__progress--buffer {
|
635
|
+
color: $plyr-video-progress-buffered-bg;
|
636
|
+
}
|
637
|
+
.plyr--audio .plyr__progress--buffer,
|
638
|
+
.plyr--audio .plyr__volume--display {
|
639
|
+
background: $plyr-audio-range-track-bg;
|
640
|
+
}
|
641
|
+
.plyr--audio .plyr__progress--buffer {
|
642
|
+
color: $plyr-audio-progress-buffered-bg;
|
643
|
+
}
|
644
|
+
|
645
|
+
// Loading state
|
646
|
+
.plyr--loading .plyr__progress--buffer {
|
647
|
+
animation: plyr-progress 1s linear infinite;
|
648
|
+
background-size: $plyr-progress-loading-size $plyr-progress-loading-size;
|
649
|
+
background-repeat: repeat-x;
|
650
|
+
background-image: linear-gradient(
|
651
|
+
-45deg,
|
652
|
+
$plyr-progress-loading-bg 25%,
|
653
|
+
transparent 25%,
|
654
|
+
transparent 50%,
|
655
|
+
$plyr-progress-loading-bg 50%,
|
656
|
+
$plyr-progress-loading-bg 75%,
|
657
|
+
transparent 75%,
|
658
|
+
transparent);
|
659
|
+
color: transparent;
|
660
|
+
}
|
661
|
+
.plyr--video.plyr--loading .plyr__progress--buffer {
|
662
|
+
background-color: $plyr-video-progress-buffered-bg;
|
663
|
+
}
|
664
|
+
.plyr--audio.plyr--loading .plyr__progress--buffer {
|
665
|
+
background-color: $plyr-audio-progress-buffered-bg;
|
666
|
+
}
|
667
|
+
|
668
|
+
// Time
|
669
|
+
// --------------------------------------------------------------
|
670
|
+
.plyr__time {
|
671
|
+
display: inline-block;
|
672
|
+
vertical-align: middle;
|
673
|
+
font-size: $plyr-font-size-small;
|
674
|
+
}
|
675
|
+
// Media duration hidden on small screens
|
676
|
+
.plyr__time + .plyr__time {
|
677
|
+
display: none;
|
678
|
+
|
679
|
+
@media (min-width: $plyr-bp-screen-md) {
|
680
|
+
display: inline-block;
|
681
|
+
}
|
682
|
+
|
683
|
+
// Add a slash in before
|
684
|
+
&::before {
|
685
|
+
content: '\2044';
|
686
|
+
margin-right: $plyr-control-spacing;
|
687
|
+
}
|
688
|
+
}
|
689
|
+
|
690
|
+
// Volume
|
691
|
+
// --------------------------------------------------------------
|
692
|
+
.plyr__volume {
|
693
|
+
display: none;
|
694
|
+
}
|
695
|
+
.plyr .plyr__volume {
|
696
|
+
flex: 1;
|
697
|
+
position: relative;
|
698
|
+
|
699
|
+
input[type="range"] {
|
700
|
+
position: relative;
|
701
|
+
z-index: 2;
|
702
|
+
}
|
703
|
+
@media (min-width: $plyr-bp-screen-sm) {
|
704
|
+
display: block;
|
705
|
+
max-width: 60px;
|
706
|
+
}
|
707
|
+
@media (min-width: $plyr-bp-screen-md) {
|
708
|
+
max-width: 100px;
|
709
|
+
}
|
710
|
+
}
|
711
|
+
|
712
|
+
// Hide sound controls on iOS
|
713
|
+
// It's not supported to change volume using JavaScript:
|
714
|
+
// https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html
|
715
|
+
.plyr--is-ios .plyr__volume,
|
716
|
+
.plyr--is-ios [data-plyr='mute'] {
|
717
|
+
display: none !important;
|
718
|
+
}
|
719
|
+
|
720
|
+
// Fullscreen
|
721
|
+
// --------------------------------------------------------------
|
722
|
+
.plyr--fullscreen-active {
|
723
|
+
position: fixed;
|
724
|
+
top: 0;
|
725
|
+
left: 0;
|
726
|
+
right: 0;
|
727
|
+
bottom: 0;
|
728
|
+
height: 100%;
|
729
|
+
width: 100%;
|
730
|
+
z-index: 10000000;
|
731
|
+
background: #000;
|
732
|
+
border-radius: 0 !important;
|
733
|
+
|
734
|
+
video {
|
735
|
+
height: 100%;
|
736
|
+
}
|
737
|
+
.plyr__video-wrapper {
|
738
|
+
height: 100%;
|
739
|
+
width: 100%;
|
740
|
+
}
|
741
|
+
.plyr__video-embed {
|
742
|
+
// Revert overflow change
|
743
|
+
overflow: visible;
|
744
|
+
}
|
745
|
+
.plyr__controls {
|
746
|
+
position: absolute;
|
747
|
+
bottom: 0;
|
748
|
+
left: 0;
|
749
|
+
right: 0;
|
750
|
+
}
|
751
|
+
|
752
|
+
// Vimeo requires some different styling
|
753
|
+
&.plyr--vimeo .plyr__video-wrapper {
|
754
|
+
height: 0;
|
755
|
+
top: 50%;
|
756
|
+
transform: translateY(-50%);
|
757
|
+
}
|
758
|
+
}
|