plyr-rails 2.0.11 → 2.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ .plyr input[type=range]:focus,.plyr:focus{outline:0}.plyr .plyr__video-embed iframe,.plyr__tooltip{pointer-events:none}@keyframes plyr-progress{to{background-position:25px 0}}.plyr{position:relative;max-width:100%;min-width:200px;font-family:Avenir,'Avenir Next','Helvetica Neue','Segoe UI',Helvetica,Arial,sans-serif;direction:ltr}.plyr,.plyr *,.plyr ::after,.plyr ::before{box-sizing:border-box}.plyr a,.plyr button,.plyr input,.plyr label{-ms-touch-action:manipulation;touch-action:manipulation}.plyr audio,.plyr video{width:100%;height:auto;vertical-align:middle;border-radius:inherit}.plyr input[type=range]{display:block;height:20px;width:100%;margin:0;padding:0;vertical-align:middle;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;border:none;background:0 0}.plyr input[type=range]::-webkit-slider-runnable-track{height:8px;background:0 0;border:0;border-radius:4px;-webkit-user-select:none;user-select:none}.plyr input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;position:relative;height:16px;width:16px;background:#fff;border:2px solid transparent;border-radius:100%;transition:background .2s ease,border .2s ease,transform .2s ease;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.15);box-sizing:border-box}.plyr input[type=range]::-moz-range-track{height:8px;background:0 0;border:0;border-radius:4px;-moz-user-select:none;user-select:none}.plyr input[type=range]::-moz-range-thumb{position:relative;height:16px;width:16px;background:#fff;border:2px solid transparent;border-radius:100%;transition:background .2s ease,border .2s ease,transform .2s ease;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.15);box-sizing:border-box}.plyr input[type=range]::-ms-track{height:8px;background:0 0;border:0;color:transparent}.plyr input[type=range]::-ms-fill-upper{height:8px;background:0 0;border:0;border-radius:4px;-ms-user-select:none;user-select:none}.plyr input[type=range]::-ms-fill-lower{height:8px;border:0;border-radius:4px;-ms-user-select:none;user-select:none;background:#3498db}.plyr input[type=range]::-ms-thumb{position:relative;height:16px;width:16px;background:#fff;border:2px solid transparent;border-radius:100%;transition:background .2s ease,border .2s ease,transform .2s ease;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(0,0,0,.15);box-sizing:border-box;margin-top:0}.plyr input[type=range]::-ms-tooltip{display:none}.plyr input[type=range]::-moz-focus-outer{border:0}.plyr input[type=range].tab-focus:focus{outline-offset:3px}.plyr input[type=range]:active::-webkit-slider-thumb{background:#3498db;border-color:#fff;transform:scale(1.25)}.plyr input[type=range]:active::-moz-range-thumb{background:#3498db;border-color:#fff;transform:scale(1.25)}.plyr input[type=range]:active::-ms-thumb{background:#3498db;border-color:#fff;transform:scale(1.25)}.plyr--video input[type=range].tab-focus:focus{outline:rgba(255,255,255,.5) dotted 1px}.plyr--audio input[type=range].tab-focus:focus{outline:rgba(86,93,100,.5) dotted 1px}.plyr__sr-only{clip:rect(1px,1px,1px,1px);overflow:hidden;position:absolute!important;padding:0!important;border:0!important;height:1px!important;width:1px!important}.plyr__video-wrapper{position:relative;background:#000;border-radius:inherit}.plyr__video-embed{padding-bottom:56.25%;height:0;border-radius:inherit;overflow:hidden;z-index:0}.plyr__video-embed iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.plyr__video-embed>div{position:relative;padding-bottom:200%;transform:translateY(-35.95%)}.plyr video::-webkit-media-text-track-container{display:none}.plyr__captions{display:none;position:absolute;bottom:0;left:0;width:100%;padding:20px;transform:translateY(-40px);transition:transform .3s ease;color:#fff;font-size:16px;text-align:center;font-weight:400}.plyr__captions span{border-radius:2px;padding:3px 10px;background:rgba(0,0,0,.7);-webkit-box-decoration-break:clone;box-decoration-break:clone;line-height:150%}.plyr__captions span:empty{display:none}@media (min-width:768px){.plyr__captions{font-size:24px}}.plyr--captions-active .plyr__captions{display:block}.plyr--hide-controls .plyr__captions{transform:translateY(-15px)}@media (min-width:1024px){.plyr--fullscreen-active .plyr__captions{font-size:32px}}.plyr ::-webkit-media-controls{display:none}.plyr__controls{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;line-height:1;text-align:center}.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>button{margin-left:5px}.plyr__controls .plyr__progress:first-child,.plyr__controls .plyr__time:first-child,.plyr__controls>button:first-child{margin-left:0}.plyr__controls .plyr__volume{margin-left:5px}.plyr__controls [data-plyr=pause]{margin-left:0}.plyr__controls button{position:relative;display:inline-block;-ms-flex-negative:0;flex-shrink:0;overflow:visible;vertical-align:middle;padding:7px;border:0;background:0 0;border-radius:3px;cursor:pointer;transition:background .3s ease,color .3s ease,opacity .3s ease;color:inherit}.plyr__controls button svg{width:18px;height:18px;display:block;fill:currentColor}.plyr__controls button:focus{outline:0}.plyr__controls .icon--captions-on,.plyr__controls .icon--exit-fullscreen,.plyr__controls .icon--muted{display:none}@media (min-width:480px){.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>button{margin-left:10px}}.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none}.plyr--video .plyr__controls{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:50px 10px 10px;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.5));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;color:#fff;transition:opacity .3s ease}.plyr--video .plyr__controls button.tab-focus:focus,.plyr--video .plyr__controls button:hover{background:#3498db;color:#fff}.plyr--audio .plyr__controls{padding:10px;border-radius:inherit;background:#fff;border:1px solid #dbe3e8;color:#565D64}.plyr--audio .plyr__controls button.tab-focus:focus,.plyr--audio .plyr__controls button:hover,.plyr__play-large{background:#3498db;color:#fff}.plyr__play-large{display:none;position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);padding:10px;border:4px solid currentColor;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15);transition:all .3s ease}.plyr__play-large svg{position:relative;left:2px;width:20px;height:20px;display:block;fill:currentColor}.plyr__play-large:focus{outline:rgba(255,255,255,.5) dotted 1px}.plyr .plyr__play-large{display:inline-block}.plyr--audio .plyr__play-large,.plyr--playing .plyr__controls [data-plyr=play],.plyr__controls [data-plyr=pause]{display:none}.plyr--playing .plyr__play-large{opacity:0;visibility:hidden}.plyr--playing .plyr__controls [data-plyr=pause]{display:inline-block}.plyr--captions-active .plyr__controls .icon--captions-on,.plyr--fullscreen-active .icon--exit-fullscreen,.plyr--muted .plyr__controls .icon--muted{display:block}.plyr [data-plyr=captions],.plyr [data-plyr=fullscreen],.plyr--captions-active .plyr__controls .icon--captions-on+svg,.plyr--fullscreen-active .icon--exit-fullscreen+svg,.plyr--muted .plyr__controls .icon--muted+svg{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__tooltip{position:absolute;z-index:2;bottom:100%;margin-bottom:10px;padding:5px 7.5px;opacity:0;background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-size:14px;line-height:1.3;transform:translate(-50%,10px) scale(.8);transform-origin:50% 100%;transition:transform .2s .1s ease,opacity .2s .1s ease}.plyr__tooltip::before{content:'';position:absolute;width:0;height:0;left:50%;transform:translateX(-50%);bottom:-4px;border-right:4px solid transparent;border-top:4px solid rgba(0,0,0,.7);border-left:4px solid transparent;z-index:2}.plyr button.tab-focus:focus .plyr__tooltip,.plyr button:hover .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%,0) scale(1)}.plyr button:hover .plyr__tooltip{z-index:3}.plyr__controls button:first-child .plyr__tooltip{left:0;transform:translate(0,10px) scale(.8);transform-origin:0 100%}.plyr__controls button:first-child .plyr__tooltip::before{left:16px}.plyr__controls button:last-child .plyr__tooltip{right:0;transform:translate(0,10px) scale(.8);transform-origin:100% 100%}.plyr__controls button:last-child .plyr__tooltip::before{left:auto;right:16px;transform:translateX(50%)}.plyr__controls button:first-child .plyr__tooltip--visible,.plyr__controls button:first-child.tab-focus:focus .plyr__tooltip,.plyr__controls button:first-child:hover .plyr__tooltip,.plyr__controls button:last-child .plyr__tooltip--visible,.plyr__controls button:last-child.tab-focus:focus .plyr__tooltip,.plyr__controls button:last-child:hover .plyr__tooltip{transform:translate(0,0) scale(1)}.plyr__progress{position:relative;display:none;-ms-flex:1;flex:1}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress input[type=range]::-webkit-slider-runnable-track{background:0 0}.plyr__progress input[type=range]::-moz-range-track{background:0 0}.plyr__progress input[type=range]::-ms-fill-upper{background:0 0}.plyr__progress .plyr__tooltip{left:0}.plyr .plyr__progress{display:inline-block}.plyr__progress--buffer,.plyr__progress--played,.plyr__volume--display{position:absolute;left:0;top:50%;width:100%;height:8px;margin:-4px 0 0;padding:0;vertical-align:top;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:100px}.plyr__progress--buffer::-webkit-progress-bar,.plyr__progress--played::-webkit-progress-bar,.plyr__volume--display::-webkit-progress-bar{background:0 0}.plyr__progress--buffer::-webkit-progress-value,.plyr__progress--played::-webkit-progress-value,.plyr__volume--display::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:8px}.plyr__progress--buffer::-moz-progress-bar,.plyr__progress--played::-moz-progress-bar,.plyr__volume--display::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:8px}.plyr__progress--buffer::-ms-fill,.plyr__progress--played::-ms-fill,.plyr__volume--display::-ms-fill{border-radius:100px}.plyr__progress--played,.plyr__volume--display{z-index:1;color:#3498db;background:0 0;transition:none}.plyr__progress--played::-webkit-progress-value,.plyr__volume--display::-webkit-progress-value{min-width:8px;max-width:99%;border-top-right-radius:0;border-bottom-right-radius:0;transition:none}.plyr__progress--played::-moz-progress-bar,.plyr__volume--display::-moz-progress-bar{min-width:8px;max-width:99%;border-top-right-radius:0;border-bottom-right-radius:0;transition:none}.plyr__progress--played::-ms-fill,.plyr__volume--display::-ms-fill{display:none}.plyr__progress--buffer::-webkit-progress-value{transition:width .2s ease}.plyr__progress--buffer::-moz-progress-bar{transition:width .2s ease}.plyr__progress--buffer::-ms-fill{transition:width .2s ease}.plyr--video .plyr__progress--buffer,.plyr--video .plyr__volume--display{background:rgba(255,255,255,.25)}.plyr--video .plyr__progress--buffer{color:rgba(255,255,255,.25)}.plyr--audio .plyr__progress--buffer,.plyr--audio .plyr__volume--display{background:rgba(198,214,219,.66)}.plyr--audio .plyr__progress--buffer{color:rgba(198,214,219,.66)}.plyr--loading .plyr__progress--buffer{animation:plyr-progress 1s linear infinite;background-size:25px 25px;background-repeat:repeat-x;background-image:linear-gradient(-45deg,rgba(0,0,0,.15) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.15) 50%,rgba(0,0,0,.15) 75%,transparent 75%,transparent);color:transparent}.plyr--video.plyr--loading .plyr__progress--buffer{background-color:rgba(255,255,255,.25)}.plyr--audio.plyr--loading .plyr__progress--buffer{background-color:rgba(198,214,219,.66)}.plyr__time{display:inline-block;vertical-align:middle;font-size:14px}.plyr__time+.plyr__time{display:none}@media (min-width:768px){.plyr__time+.plyr__time{display:inline-block}}.plyr__time+.plyr__time::before{content:'\2044';margin-right:10px}.plyr__volume{display:none}.plyr .plyr__volume{-ms-flex:1;flex:1;position:relative}.plyr .plyr__volume input[type=range]{position:relative;z-index:2}@media (min-width:480px){.plyr .plyr__volume{display:block;max-width:60px}}@media (min-width:768px){.plyr .plyr__volume{max-width:100px}}.plyr--is-ios .plyr__volume,.plyr--is-ios [data-plyr=mute]{display:none!important}.plyr--fullscreen-active{position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:10000000;background:#000;border-radius:0!important}.plyr--fullscreen-active video{height:100%}.plyr--fullscreen-active .plyr__video-wrapper{height:100%;width:100%}.plyr--fullscreen-active .plyr__video-embed{overflow:visible}.plyr--fullscreen-active .plyr__controls{position:absolute;bottom:0;left:0;right:0}.plyr--fullscreen-active.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plyr-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohammed Sadiq
@@ -86,9 +86,7 @@ files:
86
86
  - vendor/assets/sprite/plyr-rewind.svg
87
87
  - vendor/assets/sprite/plyr-volume.svg
88
88
  - vendor/assets/stylesheets/.keep
89
- - vendor/assets/stylesheets/mixins.scss
90
- - vendor/assets/stylesheets/plyr.scss
91
- - vendor/assets/stylesheets/variables.scss
89
+ - vendor/assets/stylesheets/plyr.css
92
90
  homepage: https://github.com/sadiqmmm/plyr-rails
93
91
  licenses:
94
92
  - MIT
@@ -1,29 +0,0 @@
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
- }
@@ -1,758 +0,0 @@
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
- }