plyr.css 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. @-webkit-keyframes plyr-progress {
  2. to {
  3. background-position: 25px 0; } }
  4. @keyframes plyr-progress {
  5. to {
  6. background-position: 25px 0; } }
  7. .plyr {
  8. position: relative;
  9. min-width: 200px;
  10. max-width: 100%;
  11. font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
  12. direction: ltr; }
  13. .plyr, .plyr *, .plyr *::after, .plyr *::before {
  14. box-sizing: border-box; }
  15. .plyr a, .plyr button, .plyr input, .plyr label {
  16. -ms-touch-action: manipulation;
  17. touch-action: manipulation; }
  18. .plyr:focus {
  19. outline: 0; }
  20. .plyr video, .plyr audio {
  21. width: 100%;
  22. height: auto;
  23. vertical-align: middle;
  24. border-radius: inherit; }
  25. .plyr input[type='range'] {
  26. display: block;
  27. width: 100%;
  28. height: 20px;
  29. padding: 0;
  30. margin: 0;
  31. vertical-align: middle;
  32. cursor: pointer;
  33. background: transparent;
  34. border: none;
  35. -webkit-appearance: none;
  36. -moz-appearance: none;
  37. appearance: none; }
  38. .plyr input[type='range']::-webkit-slider-runnable-track {
  39. height: 8px;
  40. background: transparent;
  41. border: 0;
  42. border-radius: 4px;
  43. -webkit-user-select: none;
  44. user-select: none; }
  45. .plyr input[type='range']::-webkit-slider-thumb {
  46. position: relative;
  47. height: 16px;
  48. width: 16px;
  49. background: #fff;
  50. border: 2px solid transparent;
  51. border-radius: 100%;
  52. transition: background .2s ease, border .2s ease, -webkit-transform .2s ease;
  53. transition: background .2s ease, border .2s ease, transform .2s ease;
  54. transition: background .2s ease, border .2s ease, transform .2s ease, -webkit-transform .2s ease;
  55. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
  56. box-sizing: border-box;
  57. margin-top: -4px;
  58. -webkit-appearance: none; }
  59. .plyr input[type='range']::-moz-range-track {
  60. height: 8px;
  61. background: transparent;
  62. border: 0;
  63. border-radius: 4px;
  64. -moz-user-select: none;
  65. user-select: none; }
  66. .plyr input[type='range']::-moz-range-thumb {
  67. position: relative;
  68. height: 16px;
  69. width: 16px;
  70. background: #fff;
  71. border: 2px solid transparent;
  72. border-radius: 100%;
  73. transition: background .2s ease, border .2s ease, -webkit-transform .2s ease;
  74. transition: background .2s ease, border .2s ease, transform .2s ease;
  75. transition: background .2s ease, border .2s ease, transform .2s ease, -webkit-transform .2s ease;
  76. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
  77. box-sizing: border-box; }
  78. .plyr input[type='range']::-ms-track {
  79. height: 8px;
  80. color: transparent;
  81. background: transparent;
  82. border: 0; }
  83. .plyr input[type='range']::-ms-fill-upper {
  84. height: 8px;
  85. background: transparent;
  86. border: 0;
  87. border-radius: 4px;
  88. -ms-user-select: none;
  89. user-select: none; }
  90. .plyr input[type='range']::-ms-fill-lower {
  91. height: 8px;
  92. background: transparent;
  93. border: 0;
  94. border-radius: 4px;
  95. -ms-user-select: none;
  96. user-select: none;
  97. background: #3e8ef7; }
  98. .plyr input[type='range']::-ms-thumb {
  99. position: relative;
  100. height: 16px;
  101. width: 16px;
  102. background: #fff;
  103. border: 2px solid transparent;
  104. border-radius: 100%;
  105. transition: background .2s ease, border .2s ease, -webkit-transform .2s ease;
  106. transition: background .2s ease, border .2s ease, transform .2s ease;
  107. transition: background .2s ease, border .2s ease, transform .2s ease, -webkit-transform .2s ease;
  108. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
  109. box-sizing: border-box;
  110. margin-top: 0; }
  111. .plyr input[type='range']::-ms-tooltip {
  112. display: none; }
  113. .plyr input[type='range']:focus {
  114. outline: 0; }
  115. .plyr input[type='range']::-moz-focus-outer {
  116. border: 0; }
  117. .plyr input[type='range'].tab-focus:focus {
  118. outline-offset: 3px; }
  119. .plyr input[type='range']:active::-webkit-slider-thumb {
  120. background: #3e8ef7;
  121. border-color: #fff;
  122. -webkit-transform: scale(1.25);
  123. transform: scale(1.25); }
  124. .plyr input[type='range']:active::-moz-range-thumb {
  125. background: #3e8ef7;
  126. border-color: #fff;
  127. transform: scale(1.25); }
  128. .plyr input[type='range']:active::-ms-thumb {
  129. background: #3e8ef7;
  130. border-color: #fff;
  131. transform: scale(1.25); }
  132. .plyr--video input[type='range'].tab-focus:focus {
  133. outline: 1px dotted rgba(255, 255, 255, 0.5); }
  134. .plyr--audio input[type='range'].tab-focus:focus {
  135. outline: 1px dotted rgba(228, 234, 236, 0.5); }
  136. .plyr__sr-only {
  137. position: absolute !important;
  138. width: 1px !important;
  139. height: 1px !important;
  140. padding: 0 !important;
  141. border: 0 !important;
  142. overflow: hidden;
  143. clip: rect(1px, 1px, 1px, 1px); }
  144. .plyr__video-wrapper {
  145. position: relative;
  146. background: #000;
  147. border-radius: inherit;
  148. -webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC); }
  149. .plyr__video-embed {
  150. height: 0;
  151. padding-bottom: 56.25%;
  152. /* 16:9 */
  153. overflow: hidden;
  154. border-radius: inherit; }
  155. .plyr__video-embed iframe {
  156. position: absolute;
  157. top: 0;
  158. left: 0;
  159. width: 100%;
  160. height: 100%;
  161. -webkit-user-select: none;
  162. -moz-user-select: none;
  163. -ms-user-select: none;
  164. user-select: none;
  165. border: 0; }
  166. .plyr__video-embed > div {
  167. position: relative;
  168. padding-bottom: 200%;
  169. -webkit-transform: translateY(-35.95%);
  170. transform: translateY(-35.95%); }
  171. .plyr .plyr__video-embed iframe {
  172. pointer-events: none; }
  173. .plyr video::-webkit-media-text-track-container {
  174. display: none; }
  175. .plyr__captions {
  176. position: absolute;
  177. bottom: 0;
  178. left: 0;
  179. display: none;
  180. width: 100%;
  181. padding: 20px;
  182. font-size: 16px;
  183. font-weight: 400;
  184. color: #fff;
  185. text-align: center;
  186. transition: -webkit-transform .3s ease;
  187. transition: transform .3s ease;
  188. transition: transform .3s ease, -webkit-transform .3s ease;
  189. -webkit-transform: translateY(-60px);
  190. transform: translateY(-60px); }
  191. @media (min-width: 768px) {
  192. .plyr__captions {
  193. font-size: 24px; } }
  194. .plyr__captions span {
  195. padding: 3px 10px;
  196. line-height: 150%;
  197. background: rgba(0, 0, 0, 0.7);
  198. border-radius: 2px;
  199. -webkit-box-decoration-break: clone;
  200. box-decoration-break: clone; }
  201. .plyr__captions span:empty {
  202. display: none; }
  203. .plyr--captions-active .plyr__captions {
  204. display: block; }
  205. .plyr--fullscreen-active .plyr__captions {
  206. font-size: 32px; }
  207. .plyr--hide-controls .plyr__captions {
  208. -webkit-transform: translateY(-20px);
  209. transform: translateY(-20px); }
  210. .plyr ::-webkit-media-controls {
  211. display: none; }
  212. .plyr__controls {
  213. display: -ms-flexbox;
  214. display: flex;
  215. -ms-flex-align: center;
  216. align-items: center;
  217. line-height: 1;
  218. text-align: center; }
  219. @media (min-width: 480px) {
  220. .plyr__controls > button, .plyr__controls .plyr__progress, .plyr__controls .plyr__time {
  221. margin-left: 10px; } }
  222. .plyr__controls > button, .plyr__controls .plyr__progress, .plyr__controls .plyr__time {
  223. margin-left: 5px; }
  224. .plyr__controls > button:first-child, .plyr__controls .plyr__progress:first-child, .plyr__controls .plyr__time:first-child {
  225. margin-left: 0; }
  226. .plyr__controls .plyr__volume {
  227. margin-left: 5px; }
  228. .plyr__controls [data-plyr="pause"] {
  229. margin-left: 0; }
  230. .plyr__controls button {
  231. position: relative;
  232. display: inline-block;
  233. padding: 7px;
  234. overflow: visible;
  235. color: inherit;
  236. vertical-align: middle;
  237. cursor: pointer;
  238. background: transparent;
  239. border: 0;
  240. border-radius: 3px;
  241. transition: background .3s ease, color .3s ease, opacity .3s ease;
  242. -ms-flex-negative: 0;
  243. flex-shrink: 0; }
  244. .plyr__controls button svg {
  245. display: block;
  246. width: 18px;
  247. height: 18px;
  248. fill: currentColor; }
  249. .plyr__controls button:focus {
  250. outline: 0; }
  251. .plyr__controls .icon--exit-fullscreen, .plyr__controls .icon--muted, .plyr__controls .icon--captions-on {
  252. display: none; }
  253. .plyr--hide-controls .plyr__controls {
  254. pointer-events: none;
  255. opacity: 0; }
  256. .plyr--video .plyr__controls {
  257. position: absolute;
  258. right: 0;
  259. bottom: 0;
  260. left: 0;
  261. padding: 50px 10px 10px;
  262. color: #fff;
  263. background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
  264. border-bottom-right-radius: inherit;
  265. border-bottom-left-radius: inherit;
  266. transition: opacity .3s ease; }
  267. .plyr--video .plyr__controls button.tab-focus:focus, .plyr--video .plyr__controls button:hover {
  268. color: #fff;
  269. background: #3e8ef7; }
  270. .plyr--audio .plyr__controls {
  271. padding: 10px;
  272. color: #e4eaec;
  273. background: #fff;
  274. border: 1px solid #f3f7f9;
  275. border-radius: inherit; }
  276. .plyr--audio .plyr__controls button.tab-focus:focus, .plyr--audio .plyr__controls button:hover {
  277. color: #fff;
  278. background: #3e8ef7; }
  279. .plyr__play-large {
  280. position: absolute;
  281. top: 50%;
  282. left: 50%;
  283. z-index: 1;
  284. display: none;
  285. padding: 10px;
  286. color: #fff;
  287. background: #3e8ef7;
  288. border: 2px solid currentColor;
  289. border-radius: 100%;
  290. box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  291. transition: all .3s ease;
  292. -webkit-transform: translate(-50%, -50%);
  293. transform: translate(-50%, -50%); }
  294. .plyr__play-large svg {
  295. position: relative;
  296. left: 2px;
  297. display: block;
  298. width: 20px;
  299. height: 20px;
  300. fill: currentColor; }
  301. .plyr__play-large:focus {
  302. outline: 1px dotted rgba(255, 255, 255, 0.5); }
  303. .plyr .plyr__play-large {
  304. display: inline-block; }
  305. .plyr--audio .plyr__play-large {
  306. display: none; }
  307. .plyr--playing .plyr__play-large {
  308. visibility: hidden;
  309. opacity: 0; }
  310. .plyr__controls [data-plyr='pause'], .plyr--playing .plyr__controls [data-plyr='play'] {
  311. display: none; }
  312. .plyr--playing .plyr__controls [data-plyr='pause'] {
  313. display: inline-block; }
  314. .plyr--fullscreen-active .icon--exit-fullscreen, .plyr--muted .plyr__controls .icon--muted, .plyr--captions-active .plyr__controls .icon--captions-on {
  315. display: block; }
  316. .plyr--fullscreen-active .icon--exit-fullscreen + svg, .plyr--muted .plyr__controls .icon--muted + svg, .plyr--captions-active .plyr__controls .icon--captions-on + svg {
  317. display: none; }
  318. .plyr [data-plyr='captions'], .plyr [data-plyr='fullscreen'] {
  319. display: none; }
  320. .plyr--captions-enabled [data-plyr='captions'], .plyr--fullscreen-enabled [data-plyr='fullscreen'] {
  321. display: inline-block; }
  322. .plyr__tooltip {
  323. position: absolute;
  324. bottom: 100%;
  325. z-index: 2;
  326. padding: 5px 7.5px;
  327. margin-bottom: 10px;
  328. font-size: 14px;
  329. line-height: 1.3;
  330. color: #fff;
  331. pointer-events: none;
  332. background: rgba(0, 0, 0, 0.7);
  333. border-radius: 3px;
  334. opacity: 0;
  335. transition: opacity .2s .1s ease, -webkit-transform .2s .1s ease;
  336. transition: transform .2s .1s ease, opacity .2s .1s ease;
  337. transition: transform .2s .1s ease, opacity .2s .1s ease, -webkit-transform .2s .1s ease;
  338. -webkit-transform: translate(-50%, 10px) scale(0.8);
  339. transform: translate(-50%, 10px) scale(0.8);
  340. -webkit-transform-origin: 50% 100%;
  341. transform-origin: 50% 100%; }
  342. .plyr__tooltip::before {
  343. position: absolute;
  344. bottom: -4px;
  345. left: 50%;
  346. z-index: 2;
  347. width: 0;
  348. height: 0;
  349. content: "";
  350. border-top: 4px solid rgba(0, 0, 0, 0.7);
  351. border-right: 4px solid transparent;
  352. border-left: 4px solid transparent;
  353. -webkit-transform: translateX(-50%);
  354. transform: translateX(-50%); }
  355. .plyr button:hover .plyr__tooltip, .plyr button.tab-focus:focus .plyr__tooltip, .plyr__tooltip--visible {
  356. opacity: 1;
  357. -webkit-transform: translate(-50%, 0) scale(1);
  358. transform: translate(-50%, 0) scale(1); }
  359. .plyr button:hover .plyr__tooltip {
  360. z-index: 3; }
  361. .plyr__controls button:first-child .plyr__tooltip {
  362. left: 0;
  363. -webkit-transform: translate(0, 10px) scale(0.8);
  364. transform: translate(0, 10px) scale(0.8);
  365. -webkit-transform-origin: 0 100%;
  366. transform-origin: 0 100%; }
  367. .plyr__controls button:first-child .plyr__tooltip::before {
  368. left: 16px; }
  369. .plyr__controls button:last-child .plyr__tooltip {
  370. right: 0;
  371. -webkit-transform: translate(0, 10px) scale(0.8);
  372. transform: translate(0, 10px) scale(0.8);
  373. -webkit-transform-origin: 100% 100%;
  374. transform-origin: 100% 100%; }
  375. .plyr__controls button:last-child .plyr__tooltip::before {
  376. right: 16px;
  377. left: auto;
  378. -webkit-transform: translateX(50%);
  379. transform: translateX(50%); }
  380. .plyr__controls button:first-child:hover .plyr__tooltip, .plyr__controls button:first-child.tab-focus:focus .plyr__tooltip, .plyr__controls button:first-child .plyr__tooltip--visible, .plyr__controls button:last-child:hover .plyr__tooltip, .plyr__controls button:last-child.tab-focus:focus .plyr__tooltip, .plyr__controls button:last-child .plyr__tooltip--visible {
  381. -webkit-transform: translate(0, 0) scale(1);
  382. transform: translate(0, 0) scale(1); }
  383. .plyr__progress {
  384. position: relative;
  385. display: none;
  386. -ms-flex: 1;
  387. flex: 1; }
  388. .plyr__progress input[type="range"] {
  389. position: relative;
  390. z-index: 2; }
  391. .plyr__progress input[type="range"]::-webkit-slider-runnable-track {
  392. background: transparent; }
  393. .plyr__progress input[type="range"]::-moz-range-track {
  394. background: transparent; }
  395. .plyr__progress input[type="range"]::-ms-fill-upper {
  396. background: transparent; }
  397. .plyr__progress .plyr__tooltip {
  398. left: 0; }
  399. .plyr .plyr__progress {
  400. display: inline-block; }
  401. .plyr__progress--buffer, .plyr__progress--played, .plyr__volume--display {
  402. position: absolute;
  403. top: 50%;
  404. left: 0;
  405. width: 100%;
  406. height: 8px;
  407. padding: 0;
  408. margin: -4px 0 0;
  409. vertical-align: top;
  410. border: none;
  411. border-radius: 100px;
  412. -webkit-appearance: none;
  413. -moz-appearance: none;
  414. appearance: none; }
  415. .plyr__progress--buffer::-webkit-progress-bar, .plyr__progress--played::-webkit-progress-bar, .plyr__volume--display::-webkit-progress-bar {
  416. background: transparent; }
  417. .plyr__progress--buffer::-webkit-progress-value, .plyr__progress--played::-webkit-progress-value, .plyr__volume--display::-webkit-progress-value {
  418. min-width: 8px;
  419. background: currentColor;
  420. border-radius: 100px; }
  421. .plyr__progress--buffer::-moz-progress-bar, .plyr__progress--played::-moz-progress-bar, .plyr__volume--display::-moz-progress-bar {
  422. min-width: 8px;
  423. background: currentColor;
  424. border-radius: 100px; }
  425. .plyr__progress--buffer::-ms-fill, .plyr__progress--played::-ms-fill, .plyr__volume--display::-ms-fill {
  426. border-radius: 100px; }
  427. .plyr__progress--played, .plyr__volume--display {
  428. z-index: 1;
  429. color: #3e8ef7;
  430. background: transparent;
  431. transition: none; }
  432. .plyr__progress--played::-webkit-progress-value, .plyr__volume--display::-webkit-progress-value {
  433. min-width: 8px;
  434. max-width: 99%;
  435. border-top-right-radius: 0;
  436. border-bottom-right-radius: 0;
  437. transition: none; }
  438. .plyr__progress--played::-moz-progress-bar, .plyr__volume--display::-moz-progress-bar {
  439. min-width: 8px;
  440. max-width: 99%;
  441. border-top-right-radius: 0;
  442. border-bottom-right-radius: 0;
  443. transition: none; }
  444. .plyr__progress--played::-ms-fill, .plyr__volume--display::-ms-fill {
  445. display: none; }
  446. .plyr__progress--buffer::-webkit-progress-value {
  447. transition: width .2s ease; }
  448. .plyr__progress--buffer::-moz-progress-bar {
  449. transition: width .2s ease; }
  450. .plyr__progress--buffer::-ms-fill {
  451. transition: width .2s ease; }
  452. .plyr--video .plyr__progress--buffer, .plyr--video .plyr__volume--display {
  453. background: rgba(255, 255, 255, 0.25); }
  454. .plyr--video .plyr__progress--buffer {
  455. color: rgba(255, 255, 255, 0.25); }
  456. .plyr--audio .plyr__progress--buffer, .plyr--audio .plyr__volume--display {
  457. background: rgba(204, 213, 219, 0.67); }
  458. .plyr--audio .plyr__progress--buffer {
  459. color: rgba(204, 213, 219, 0.67); }
  460. .plyr--loading .plyr__progress--buffer {
  461. color: transparent;
  462. background-image: linear-gradient(-45deg, rgba(0, 0, 0, 0.15) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.15) 75%, transparent 75%, transparent);
  463. background-repeat: repeat-x;
  464. background-size: 25px 25px;
  465. -webkit-animation: plyr-progress 1s linear infinite;
  466. animation: plyr-progress 1s linear infinite; }
  467. .plyr--video.plyr--loading .plyr__progress--buffer {
  468. background-color: rgba(255, 255, 255, 0.25); }
  469. .plyr--audio.plyr--loading .plyr__progress--buffer {
  470. background-color: rgba(204, 213, 219, 0.67); }
  471. .plyr__time {
  472. display: inline-block;
  473. font-size: 14px;
  474. vertical-align: middle; }
  475. .plyr__time + .plyr__time {
  476. display: none; }
  477. @media (min-width: 768px) {
  478. .plyr__time + .plyr__time {
  479. display: inline-block; } }
  480. .plyr__time + .plyr__time::before {
  481. margin-right: 10px;
  482. content: "\2044"; }
  483. .plyr__volume {
  484. display: none; }
  485. .plyr .plyr__volume {
  486. position: relative;
  487. -ms-flex: 1;
  488. flex: 1; }
  489. @media (min-width: 480px) {
  490. .plyr .plyr__volume {
  491. display: block;
  492. max-width: 60px; } }
  493. @media (min-width: 768px) {
  494. .plyr .plyr__volume {
  495. max-width: 100px; } }
  496. .plyr .plyr__volume input[type="range"] {
  497. position: relative;
  498. z-index: 2; }
  499. .plyr--is-ios .plyr__volume, .plyr--is-ios [data-plyr='mute'] {
  500. display: none !important; }
  501. .plyr--fullscreen-active {
  502. position: fixed;
  503. top: 0;
  504. right: 0;
  505. bottom: 0;
  506. left: 0;
  507. z-index: 10000000;
  508. width: 100%;
  509. height: 100%;
  510. background: #000;
  511. border-radius: 0 !important; }
  512. .plyr--fullscreen-active video {
  513. height: 100%; }
  514. .plyr--fullscreen-active .plyr__video-wrapper {
  515. width: 100%;
  516. height: 100%; }
  517. .plyr--fullscreen-active .plyr__controls {
  518. position: absolute;
  519. right: 0;
  520. bottom: 0;
  521. left: 0; }
  522. .plyr--fullscreen-active.plyr--vimeo .plyr__video-wrapper {
  523. top: 50%;
  524. height: 0;
  525. -webkit-transform: translateY(-50%);
  526. transform: translateY(-50%); }