VideoPlayer.module.css 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. .videoPlayer {
  2. position: relative;
  3. width: 100%;
  4. max-width: 800px;
  5. margin: 0 auto;
  6. border-radius: 8px;
  7. overflow: hidden;
  8. }
  9. .video {
  10. width: 100%;
  11. display: block;
  12. }
  13. .controls {
  14. position: absolute;
  15. bottom: 0;
  16. left: 0;
  17. right: 0;
  18. width: 100%;
  19. height: 100%;
  20. display: flex;
  21. flex-direction: column;
  22. justify-content: flex-end;
  23. transition: opacity 0.3s ease;
  24. }
  25. .controls.hidden {
  26. opacity: 0;
  27. }
  28. .controls.visible {
  29. opacity: 1;
  30. }
  31. .overlay {
  32. background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  33. padding: 20px;
  34. display: flex;
  35. flex-direction: column;
  36. }
  37. .progressBarContainer {
  38. width: 100%;
  39. margin-bottom: 10px;
  40. }
  41. .controlsContent {
  42. display: flex;
  43. justify-content: space-between;
  44. align-items: center;
  45. }
  46. .leftControls, .rightControls {
  47. display: flex;
  48. align-items: center;
  49. }
  50. .playPauseButton, .muteButton, .fullscreenButton {
  51. background: none;
  52. border: none;
  53. color: white;
  54. cursor: pointer;
  55. padding: 4px;
  56. margin-right: 10px;
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. }
  61. .playPauseButton:hover, .muteButton:hover, .fullscreenButton:hover {
  62. background-color: rgba(255, 255, 255, 0.1);
  63. border-radius: 50%;
  64. }
  65. .time {
  66. color: white;
  67. font-size: 14px;
  68. margin-left: 8px;
  69. }
  70. .volumeControl {
  71. display: flex;
  72. align-items: center;
  73. margin-right: 16px;
  74. }
  75. .volumeSlider {
  76. width: 60px;
  77. height: 4px;
  78. background: rgba(255, 255, 255, 0.3);
  79. border-radius: 2px;
  80. cursor: pointer;
  81. margin-left: 12px;
  82. position: relative;
  83. }
  84. .volumeLevel {
  85. position: absolute;
  86. top: 0;
  87. left: 0;
  88. height: 100%;
  89. background: #ffffff;
  90. border-radius: 2px;
  91. }
  92. .progressBar {
  93. position: relative;
  94. width: 100%;
  95. height: 4px;
  96. background: rgba(255, 255, 255, 0.3);
  97. cursor: pointer;
  98. border-radius: 2px;
  99. overflow: visible;
  100. transition: height 0.2s ease;
  101. }
  102. .progressBar:hover {
  103. height: 6px;
  104. }
  105. .progress {
  106. height: 100%;
  107. background: #ffffff;
  108. transition: width 0.1s ease-in-out;
  109. }
  110. .hoverTimeIndicator {
  111. position: absolute;
  112. bottom: 100%;
  113. transform: translateX(-50%);
  114. background-color: rgba(0, 0, 0, 0.7);
  115. color: white;
  116. padding: 4px 8px;
  117. border-radius: 4px;
  118. font-size: 12px;
  119. pointer-events: none;
  120. white-space: nowrap;
  121. margin-bottom: 8px;
  122. }
  123. .hoverTimeIndicator::after {
  124. content: '';
  125. position: absolute;
  126. top: 100%;
  127. left: 50%;
  128. margin-left: -4px;
  129. border-width: 4px;
  130. border-style: solid;
  131. border-color: rgba(0, 0, 0, 0.7) transparent transparent transparent;
  132. }
  133. .controls.smallSize .controlsContent {
  134. justify-content: space-between;
  135. }
  136. .controls.smallSize .leftControls,
  137. .controls.smallSize .rightControls {
  138. flex: 0 0 auto;
  139. display: flex;
  140. align-items: center;
  141. }
  142. .controls.smallSize .rightControls {
  143. justify-content: flex-end;
  144. }
  145. .controls.smallSize .progressBarContainer {
  146. margin-bottom: 4px;
  147. }
  148. .controls.smallSize .playPauseButton,
  149. .controls.smallSize .muteButton,
  150. .controls.smallSize .fullscreenButton {
  151. padding: 2px;
  152. margin-right: 4px;
  153. }
  154. .controls.smallSize .playPauseButton svg,
  155. .controls.smallSize .muteButton svg,
  156. .controls.smallSize .fullscreenButton svg {
  157. width: 16px;
  158. height: 16px;
  159. }
  160. .controls.smallSize .muteButton {
  161. order: -1;
  162. }