UNPKG

react-cp-youtube

Version:

YouTube player with custom controls implemented in React.

271 lines (240 loc) 4.39 kB
.videoPlayer { position: relative; background-color: black; } .video-container { position: relative; padding-bottom: 56.25%; padding-top: 0; height: 0; overflow: hidden; } .video-container iframe, .video-container object, .video-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .moveDetectorHorizontal { position: absolute; left: 0; right: 0; height: 1px; z-index: 4000; } .moveDetectorVertical { position: absolute; top: 0; bottom: 0; width: 1px; z-index: 4000; } .controls { position: absolute; bottom: 0; left: 0; right: 0; color: white; z-index: 5000; } .controlRow0 { text-align: right; } .controlRow2 { box-sizing: border-box; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0.6em; text-align: left; } .timeInfo { font-size: 0.8em; color: white; font-weight: 500; } .control-options { background-color: rgb(35 35 35 / 75%); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); display: inline-block; text-align: left; min-width: 150px; padding: 1em; margin: 1em; overflow-y: auto; max-height: 200px; margin-bottom: 0; } .control-options h2 { margin: 0; font-size: 1em; padding-bottom: 0.5em; border-bottom: 0.5px solid #7b7b7b; text-align: left; } .control-options ul { list-style: none; padding: 0; margin: 0.2em; } .control-options li { padding: 0.4em; padding-top: 0.3em; padding-bottom: 0.3em; margin-bottom: 0.2em; cursor: pointer; } .control-options li:hover { background-color: rgb(0 0 0 / 20%); } .mobile-expand { background-color: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); position: absolute; left: 0; right: 0; bottom: 0; width: 50px; padding: 0.3em; padding-left: 1em; padding-right: 1em; margin: auto; text-align: center; cursor: pointer; } .mobile-expand-icon { height: 0.7em; } .volume-container { display: inline-block; margin-left: 1em; margin-right: 1em; } .control-shadow { background: linear-gradient( 0deg, rgb(0 0 0 / 0.7) 0%, rgba(0, 0, 0, 0) 100% ); padding: 20px; } .fullscreen{ background-color: black; } .mobile-settings{ position: fixed; left: 0; right: 0; width: 80%; top: 20%; z-index: 90000; margin: auto; background-color: #0e0c0c; box-shadow: 0 0 34px 4px #00000096; border: none; border-radius: 20px; padding: 2em; box-sizing: border-box; color: white; } .mobile-settings-close{ background-color: #292324; border: none; color: white; position: absolute; right: 2em; top: 2em; font-size: 0.6em; padding: 1em; border-radius: 50%; -webkit-appearance: none; } .mobile-settings hr{ border: .5px solid #292525; } .mobile-settings h2{ font-size: 1.4em; margin: 0; margin-left: 0.2em; margin-top: 1em; } .mobile-settings select{ width: 100%; padding: 0.8em; box-sizing: border-box; background-color: #282323; color: white; font-weight: bold; border: 1px solid #282323; box-sizing: border-box; -webkit-appearance: none } .mobile-settings-background { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; background-color: #00000096; z-index: 89999; }.custom-youtube-player-progress-bar-outer { height: 3px; background-color: #909090; position: relative; border-radius: 3px; cursor: pointer; } .custom-youtube-player-progress-bar-inner { height: 3px; border-radius: 3px; cursor: pointer; } .custom-youtube-player-progress-bar-knob { height: 12px; width: 12px; border-radius: 50%; position: absolute; top: -5px; cursor: pointer; } .custom-youtube-player-progress-bar-hidden-knob{ height: 36px; width: 36px; border-radius: 50%; position: absolute; top: -17px; cursor: pointer; } .hidden-mouse-tracker { position: fixed; left: 0; right: 0; top: 0; bottom: 0; width: 100vw; height: 100vh; z-index: 100000; cursor: pointer; } *.unselectable { -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; }.toggleButton { height: 1em; display: inline-block; vertical-align: middle; cursor: pointer; } .toggleButtonImage { height: inherit; }