You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

127 lines
4.3 KiB

  1. /*
  2. Player Skin Designer for Video.js
  3. http://videojs.com
  4. To customize the player skin edit
  5. the CSS below. Click "details"
  6. below to add comments or questions.
  7. This file uses some SCSS. Learn more
  8. at http://sass-lang.com/guide)
  9. This designer can be linked to at:
  10. https://codepen.io/heff/pen/EarCt/left/?editors=010
  11. */
  12. // The following are SCSS variables to automate some of the values.
  13. // But don't feel limited by them. Change/replace whatever you want.
  14. // The color of icons, text, and the big play button border.
  15. // Try changing to #0f0
  16. $primary-foreground-color: #fff; // #fff default
  17. // The default color of control backgrounds is mostly black but with a little
  18. // bit of blue so it can still be seen on all-black video frames, which are common.
  19. // Try changing to #900
  20. $primary-background-color: @blue; // #2B333F default
  21. // Try changing to true
  22. $center-big-play-button: true; // true default
  23. .video-js {
  24. /* The base font size controls the size of everything, not just text.
  25. All dimensions use em-based sizes so that the scale along with the font size.
  26. Try increasing it to 15px and see what happens. */
  27. font-size: 10px;
  28. /* The main font color changes the ICON COLORS as well as the text */
  29. color: $primary-foreground-color;
  30. }
  31. /* The "Big Play Button" is the play button that shows before the video plays.
  32. To center it set the align values to center and middle. The typical location
  33. of the button is the center, but there is trend towards moving it to a corner
  34. where it gets out of the way of valuable content in the poster image.*/
  35. .vjs-default-skin .vjs-big-play-button {
  36. /* The font size is what makes the big play button...big.
  37. All width/height values use ems, which are a multiple of the font size.
  38. If the .video-js font-size is 10px, then 3em equals 30px.*/
  39. font-size: 3em;
  40. /* We're using SCSS vars here because the values are used in multiple places.
  41. Now that font size is set, the following em values will be a multiple of the
  42. new font size. If the font-size is 3em (30px), then setting any of
  43. the following values to 3em would equal 30px. 3 * font-size. */
  44. $big-play-width: 3em;
  45. /* 1.5em = 45px default */
  46. $big-play-height: 1.5em;
  47. line-height: $big-play-height;
  48. height: $big-play-height;
  49. width: $big-play-width;
  50. /* 0.06666em = 2px default */
  51. border: 0.06666em solid $primary-foreground-color;
  52. /* 0.3em = 9px default */
  53. border-radius: 0.3em;
  54. @if $center-big-play-button {
  55. /* Align center */
  56. left: 50%;
  57. top: 50%;
  58. margin-left: -($big-play-width / 2);
  59. margin-top: -($big-play-height / 2);
  60. } @else {
  61. /* Align top left. 0.5em = 15px default */
  62. left: 0.5em;
  63. top: 0.5em;
  64. }
  65. }
  66. /* The default color of control backgrounds is mostly black but with a little
  67. bit of blue so it can still be seen on all-black video frames, which are common. */
  68. .video-js .vjs-control-bar,
  69. .video-js .vjs-big-play-button,
  70. .video-js .vjs-menu-button .vjs-menu-content {
  71. /* IE8 - has no alpha support */
  72. background-color: $primary-background-color;
  73. /* Opacity: 1.0 = 100%, 0.0 = 0% */
  74. background-color: rgba($primary-background-color, 0.7);
  75. }
  76. // Make a slightly lighter version of the main background
  77. // for the slider background.
  78. $slider-bg-color: lighten($primary-background-color, 33%);
  79. /* Slider - used for Volume bar and Progress bar */
  80. .video-js .vjs-slider {
  81. background-color: $slider-bg-color;
  82. background-color: rgba($slider-bg-color, 0.5);
  83. }
  84. /* The slider bar color is used for the progress bar and the volume bar
  85. (the first two can be removed after a fix that's coming) */
  86. .video-js .vjs-volume-level,
  87. .video-js .vjs-play-progress,
  88. .video-js .vjs-slider-bar {
  89. background: $primary-foreground-color;
  90. }
  91. /* The main progress bar also has a bar that shows how much has been loaded. */
  92. .video-js .vjs-load-progress {
  93. /* For IE8 we'll lighten the color */
  94. background: lighten($slider-bg-color, 25%);
  95. /* Otherwise we'll rely on stacked opacities */
  96. background: rgba($slider-bg-color, 0.5);
  97. }
  98. /* The load progress bar also has internal divs that represent
  99. smaller disconnected loaded time ranges */
  100. .video-js .vjs-load-progress div {
  101. /* For IE8 we'll lighten the color */
  102. background: lighten($slider-bg-color, 50%);
  103. /* Otherwise we'll rely on stacked opacities */
  104. background: rgba($slider-bg-color, 0.75);
  105. }