Custom Html5 Video Player Codepen -

function handleWaiting() loadingIndicator.style.opacity = '1';

Wrap the element and your custom control bar in a container div . custom html5 video player codepen

/* ----- CUSTOM CONTROLS BAR (modern glass) ----- */ .custom-controls background: rgba(20, 22, 36, 0.85); backdrop-filter: blur(12px); padding: 12px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid rgba(255, 255, 255, 0.15); transition: opacity 0.25s ease; font-size: 14px; function handleWaiting() loadingIndicator

// ----- state flags ----- let isDraggingProgress = false; let controlsTimeout = null; let isControlsVisible = true; padding: 12px 18px