Custom Html5 Video Player Codepen -
.volume-slider width: 80px; height: 4px; -webkit-appearance: none; background: rgba(255, 255, 255, 0.3); border-radius: 5px; outline: none; cursor: pointer;
<div class="custom-controls"> <!-- Play/Pause Button --> <button class="ctrl-btn play-pause-btn" id="playPauseBtn" aria-label="Play/Pause"> <i class="fas fa-play"></i> </button>
body background: linear-gradient(145deg, #0b1120 0%, #111827 100%); min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; padding: 1.5rem; custom html5 video player codepen
/* responsive adjustments */ @media (max-width: 620px) .custom-controls padding: 0.7rem; gap: 0.5rem; .ctrl-btn width: 36px; height: 36px; font-size: 1.1rem; .volume-slider width: 55px; .time-display font-size: 0.7rem; .speed-select font-size: 0.7rem; padding: 0.2rem 0.5rem;
/* PLAY/PAUSE BIG ICON */ .play-pause-btn background: rgba(59, 130, 246, 0.85); color: white; font-weight: bold; .play-pause-btn:hover background: #3b82f6; .volume-slider width: 80px
/* SPEED DROPDOWN */ .speed-select background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.2); color: white; padding: 0.3rem 0.6rem; border-radius: 32px; font-size: 0.8rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: 0.1s; .speed-select:hover background: #1e293b;
<!-- Volume control with icon --> <div class="volume-wrapper"> <button class="ctrl-btn" id="muteBtn" style="background:transparent; width:32px; height:32px;" aria-label="Mute"> <i class="fas fa-volume-up"></i> </button> <input type="range" id="volumeSlider" class="volume-slider" min="0" max="1" step="0.02" value="0.8"> </div> !-- Play/Pause Button -->
.volume-slider::-webkit-slider-thumb -webkit-appearance: none; width: 12px; height: 12px; background: #ffffff; border-radius: 50%; cursor: pointer; box-shadow: 0 0 4px #3b82f6;
<!-- Time display --> <div class="time-display" id="timeDisplay"> 00:00 / 00:00 </div>