video.less 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. //
  2. // Video Player
  3. // --------------------------------------------------
  4. // Player wrapp
  5. .video-js {
  6. background-color: transparent;
  7. position: relative;
  8. padding-bottom: 47px;
  9. font-size: 0;
  10. vertical-align: middle;
  11. overflow: hidden;
  12. backface-visibility: hidden;
  13. border-top-radius: @vplayer-border-radius;
  14. width: 100% !important;
  15. height: auto !important;
  16. // <video>
  17. .vjs-tech {
  18. height: 100%;
  19. width: 100%;
  20. display: block;
  21. }
  22. &::-moz-full-screen {
  23. position: absolute;
  24. }
  25. &::-webkit-full-screen {
  26. width: 100% !important;
  27. height: 100% !important;
  28. }
  29. }
  30. // Fullscreen view
  31. .vjs-fullscreen {
  32. position: fixed;
  33. overflow: hidden;
  34. z-index: @vplayer-fullscreen-zindex;
  35. left: 0;
  36. top: 0;
  37. bottom: 0;
  38. right: 0;
  39. width: 100% !important;
  40. height: 100% !important;
  41. border-top-radius: 0;
  42. .vjs-control-bar {
  43. margin-top: 0;
  44. .border-bottom-radius(0);
  45. }
  46. .vjs-tech {
  47. background-color: @vplayer-fullscreen-bg;
  48. }
  49. }
  50. // Poster
  51. .vjs-poster {
  52. margin: 0 auto;
  53. padding: 0;
  54. cursor: pointer;
  55. position: relative;
  56. width: 100%;
  57. max-height: 100%;
  58. border-top-radius: @vplayer-border-radius;
  59. }
  60. // Control bar
  61. .vjs-control-bar {
  62. position: relative;
  63. height: 47px;
  64. color: @vplayer-control-bar-color;
  65. background: @vplayer-control-bar-bg;
  66. margin-top: -1px;
  67. .border-bottom-radius(@vplayer-border-radius);
  68. user-select: none;
  69. &.vjs-fade-out {
  70. visibility: visible !important;
  71. opacity: 1 !important;
  72. }
  73. }
  74. // Other elements
  75. .vjs-text-track-display {
  76. text-align: center;
  77. position: absolute;
  78. bottom: 4em;
  79. left: 1em;
  80. right: 1em;
  81. font-family: @font-family-base;
  82. }
  83. .vjs-text-track {
  84. display: none;
  85. color: @vplayer-control-bar-color;
  86. font-size: 1.4em;
  87. text-align: center;
  88. margin-bottom: .1em;
  89. background-color: @vplayer-text-track-bg;
  90. }
  91. .vjs-subtitles {
  92. color: @inverse;
  93. }
  94. .vjs-captions {
  95. color: #fc6;
  96. }
  97. .vjs-tt-cue {
  98. display: block;
  99. }
  100. .vjs-fade-in {
  101. visibility: visible !important;
  102. opacity: 1 !important;
  103. transition: visibility 0s linear 0s, opacity .3s linear;
  104. }
  105. .vjs-fade-out {
  106. visibility: hidden !important;
  107. opacity: 0 !important;
  108. transition: visibility 0s linear 1.5s, opacity 1.5s linear;
  109. }
  110. // Player control general style
  111. // --------------------------------------------------
  112. .vjs-control {
  113. background-position: center;
  114. background-repeat: no-repeat;
  115. position: relative;
  116. text-align: center;
  117. display: inline-block;
  118. height: 18px;
  119. width: 18px;
  120. vertical-align: middle;
  121. &:focus {
  122. outline: 0
  123. }
  124. > div {
  125. background-position: center;
  126. background-repeat: no-repeat;
  127. }
  128. }
  129. // Player controls
  130. // --------------------------------------------------
  131. .vjs-control-text {
  132. border: 0;
  133. clip: rect(0 0 0 0);
  134. height: 1px;
  135. margin: -1px;
  136. overflow: hidden;
  137. padding: 0;
  138. position: absolute;
  139. width: 1px;
  140. }
  141. // Play control
  142. .vjs-play-control {
  143. cursor: pointer;
  144. height: 47px;
  145. width: 58px;
  146. > div {
  147. position: relative;
  148. height: 47px;
  149. &:before,
  150. &:after {
  151. position: absolute;
  152. font-family: "Flat-UI-Icons";
  153. color: @vplaver-play-control-color;
  154. font-size: floor((@component-font-size-base * 1.067)); // 16px
  155. top: 38%;
  156. left: 50%;
  157. margin: -0.5em 0 0 -0.5em;
  158. -webkit-font-smoothing: antialiased;
  159. transition: color .25s, opacity .25s;
  160. }
  161. &:after {
  162. content: "\e615";
  163. }
  164. &:before {
  165. content: "\e616";
  166. }
  167. }
  168. .vjs-paused & {
  169. &:hover {
  170. > div:before {
  171. color: @vplaver-play-control-hover-color;
  172. }
  173. }
  174. > div {
  175. &:after {
  176. .opacity(0);
  177. }
  178. &:before {
  179. opacity: 1;
  180. filter: none;
  181. }
  182. }
  183. }
  184. .vjs-playing & {
  185. &:hover {
  186. > div:after {
  187. color: @vplaver-play-control-hover-color;
  188. }
  189. }
  190. > div {
  191. &:after {
  192. opacity: 1;
  193. filter: none;
  194. }
  195. &:before {
  196. .opacity(0);
  197. }
  198. }
  199. }
  200. }
  201. // Rewind control
  202. .vjs-rewind-control {
  203. width: 5em;
  204. cursor: pointer !important;
  205. > div {
  206. width: 19px;
  207. height: 16px;
  208. background: none transparent;
  209. margin: .5em auto 0;
  210. }
  211. }
  212. // Mute control
  213. .vjs-mute-control {
  214. float: right;
  215. margin: 14px 0;
  216. cursor: pointer !important;
  217. &:hover,
  218. &:focus {
  219. > div {
  220. color: @vplaver-second-controls-hover-color;
  221. }
  222. }
  223. > div {
  224. height: 18px;
  225. color: @vplaver-second-controls-color;
  226. &:after,
  227. &:before {
  228. font-family: "Flat-UI-Icons";
  229. font-size: floor((@component-font-size-base * 1.067)); // 16px
  230. line-height: 18px;
  231. position: absolute;
  232. left: 50%;
  233. margin: 0 0 0 -0.5em;
  234. -webkit-font-smoothing: antialiased;
  235. -moz-osx-font-smoothing: grayscale;
  236. transition: color .25s, opacity .25s;
  237. }
  238. &:after {
  239. content: "\e617";
  240. }
  241. &:before {
  242. content: "\e618";
  243. .opacity(0);
  244. }
  245. }
  246. // Muted state
  247. &.vjs-vol-0 {
  248. > div {
  249. &:after {
  250. .opacity(0);
  251. }
  252. &:before {
  253. opacity: 1;
  254. filter: none;
  255. }
  256. }
  257. }
  258. }
  259. // Volume control
  260. .vjs-volume-control,
  261. .vjs-volume-level,
  262. .vjs-volume-handle,
  263. .vjs-volume-bar {
  264. display: none;
  265. }
  266. // Progress control
  267. .vjs-progress-control {
  268. height: 12px;
  269. position: absolute;
  270. left: 60px;
  271. right: 160px;
  272. width: auto;
  273. top: 18px;
  274. background: @vplaver-progress-bg;
  275. border-radius: 32px;
  276. }
  277. .vjs-progress-holder {
  278. position: relative;
  279. cursor: pointer !important;
  280. padding: 0;
  281. margin: 0;
  282. height: 12px;
  283. }
  284. .vjs-play-progress,
  285. .vjs-load-progress {
  286. display: block;
  287. height: 12px;
  288. margin: 0;
  289. padding: 0;
  290. border-radius: 32px;
  291. }
  292. .vjs-play-progress {
  293. background: @vplaver-play-progress-bg;
  294. left: -1px;
  295. position: absolute;
  296. top: 0;
  297. .border-right-radius(0);
  298. }
  299. .vjs-load-progress {
  300. background: @vplaver-load-progress-bg;
  301. &[style*="100%"],
  302. &[style*="99%"] {
  303. border-radius: 32px;
  304. }
  305. }
  306. .vjs-seek-handle {
  307. background-color: @vplayer-seek-handle-bg;
  308. width: 18px;
  309. height: 18px;
  310. top: 0;
  311. position: absolute;
  312. margin: -3px 0 0 -3px;
  313. border-radius: 50%;
  314. transition: background-color .25s;
  315. &[style*="95."] {
  316. margin-left: 3px;
  317. }
  318. &[style="left: 0%;"] {
  319. margin-left: -2px;
  320. }
  321. &:hover,
  322. &:focus {
  323. background-color: @vplayer-seek-handle-hover-bg;
  324. }
  325. &:active {
  326. background-color: @vplayer-seek-handle-active-bg;
  327. }
  328. }
  329. // Time control
  330. .vjs-time-controls {
  331. font-family: @font-family-base;
  332. font-weight: 300;
  333. font-size: floor((@component-font-size-base * 0.867)); // 13px
  334. line-height: normal;
  335. width: auto;
  336. height: auto;
  337. position: absolute;
  338. }
  339. .vjs-time-divider {
  340. color: @vplayer-time-divider-color;
  341. font-size: ceil((@component-font-size-base * 0.933)); // 14px;
  342. position: absolute;
  343. right: 114px;
  344. top: 11px;
  345. }
  346. .vjs-remaining-time {
  347. display: none;
  348. }
  349. .vjs-current-time {
  350. right: 122px;
  351. top: 16px;
  352. }
  353. .vjs-duration {
  354. color: @vplayer-duration-color;
  355. right: 85px;
  356. top: 16px;
  357. }
  358. // Fullscreen control
  359. .vjs-fullscreen-control {
  360. cursor: pointer;
  361. float: right;
  362. margin: 14px 15px;
  363. &:hover,
  364. &:focus {
  365. > div {
  366. color: @vplaver-second-controls-hover-color;
  367. }
  368. }
  369. > div {
  370. height: 18px;
  371. color: @vplaver-second-controls-color;
  372. &:before {
  373. font-family: "Flat-UI-Icons";
  374. content: "\e619";
  375. font-size: floor((@component-font-size-base * 1.067)); // 16px
  376. line-height: 18px;
  377. position: absolute;
  378. left: 50%;
  379. margin: 0 0 0 -0.5em;
  380. -webkit-font-smoothing: antialiased;
  381. -moz-osx-font-smoothing: grayscale;
  382. transition: color .25s, opacity .25s;
  383. }
  384. }
  385. }
  386. // Subtitles menu. Hide for no need by design.
  387. .vjs-menu-button {
  388. display: none !important;
  389. }
  390. // Rreloader
  391. // --------------------------------------------------
  392. .vjs-loading-spinner {
  393. position: absolute;
  394. top: 50%;
  395. left: 50%;
  396. background: #ebedee;
  397. display: none;
  398. height: 16px;
  399. width: 16px;
  400. border-radius: 10px;
  401. margin: -8px 0 0 -8px;
  402. animation: sharp 2s ease infinite;
  403. }
  404. .sharp-keyframes() {
  405. 0% {
  406. background-color: @vplayer-preloader-primary-bg;
  407. border-radius: 10px;
  408. transform: rotate(0deg);
  409. }
  410. 50% {
  411. background-color: @vplayer-preloader-secondary-bg;
  412. border-radius: 0;
  413. transform: rotate(180deg);
  414. }
  415. 100% {
  416. background-color: @vplayer-preloader-primary-bg;
  417. border-radius: 10px;
  418. transform: rotate(360deg);
  419. }
  420. }
  421. @-webkit-keyframes sharp {
  422. .sharp-keyframes();
  423. }
  424. @-moz-keyframes sharp {
  425. .sharp-keyframes();
  426. }
  427. @-o-keyframes sharp {
  428. .sharp-keyframes();
  429. }
  430. @keyframes sharp {
  431. .sharp-keyframes();
  432. }