plyr.css 16 KB

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