Custom Html5 Video Player Codepen Apr 2026

/* MAIN PLAYER CARD */ .player-container max-width: 960px; width: 100%; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); border-radius: 2rem; box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05); overflow: hidden; transition: all 0.2s ease;

/* VIDEO WRAPPER (controls layer) */ .video-wrapper position: relative; width: 100%; background: #000; cursor: pointer;

.ctrl-btn:hover background: rgba(255, 255, 255, 0.2); transform: scale(1.02); color: white;

<!-- 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> custom html5 video player codepen

.progress-container flex: 1; min-width: 140px; display: flex; align-items: center; gap: 0.6rem;

<!-- Progress Bar --> <div class="progress-container"> <div class="progress-bar" id="progressBar"> <div class="progress-filled" id="progressFilled"></div> </div> </div>

/* loading / overlay (optional subtle hint) */ .video-wrapper::after content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background: radial-gradient(circle at center, transparent 60%, rgba(0,0,0,0.1)); opacity: 0; transition: opacity 0.2s; /* small badge (just for style) */ .player-footer background: rgba(0,0,0,0.3); text-align: center; font-size: 0.7rem; padding: 0.5rem; color: #94a3b8; letter-spacing: 0.3px; border-top: 1px solid rgba(255,255,255,0.05); a color: #7aa2f7; text-decoration: none; </style> <!-- FontAwesome Icons (free CDN) for nice icons --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> </head> <body> /* MAIN PLAYER CARD */

/* BUTTONS STYLE */ .ctrl-btn background: transparent; border: none; color: #f0f3fa; font-size: 1.35rem; width: 40px; height: 40px; border-radius: 40px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1); background: rgba(255, 255, 255, 0.05);

/* 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;

/* 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; box-shadow: 0 25px 45px -12px rgba(0

/* TIME & SLIDER AREA */ .time-display font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; background: rgba(0, 0, 0, 0.5); padding: 0.3rem 0.7rem; border-radius: 32px; letter-spacing: 0.5px; color: #e2e8f0;

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;

/* 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;

Contact us

  • Simcore : Immeuble Cassiopé, 167 Rue de Lorient, 35000 Rennes, France
  • 02 99 14 88 50
  • contact simcore

Want to know more ?

Contact us