Custom Html5 Video Player Codepen Access

A common issue in CodePen demos is the Fullscreen API.

Many developers simply use video.webkitRequestFullScreen(). However, this puts the video element into fullscreen, effectively hiding the custom HTML controls you just built, reverting the user to the native browser controls (or nothing at all).

The Fix: The best implementations put the wrapper container into fullscreen, not just the video. This ensures the custom controls remain visible in fullscreen mode.

Add a select dropdown to the HTML controls:

<select id="speedControl">
  <option value="0.5">0.5x</option>
  <option value="1" selected>1x</option>
  <option value="1.5">1.5x</option>
  <option value="2">2x</option>
</select>

Then add this JavaScript:

const speedControl = document.getElementById('speedControl');
speedControl.addEventListener('change', () => 
  video.playbackRate = parseFloat(speedControl.value);
);

Style the container, overlay the controls, and make it responsive. We’ll also add hover effects for a polished feel.

* 
  margin: 0;
  padding: 0;
  box-sizing: border-box;

body background: #0a0a0a; display: flex; justify-content: center; align-items: center; min-height: 100vh; font-family: system-ui, 'Segoe UI', monospace;

.video-container width: 80%; max-width: 960px; position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 35px rgba(0,0,0,0.3); background: #000;

.custom-video width: 100%; display: block; cursor: pointer; custom html5 video player codepen

.video-controls display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); font-size: 14px; color: white; flex-wrap: wrap; transition: opacity 0.3s;

button, .speed-select background: none; border: none; color: white; font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 8px; transition: background 0.2s;

button:hover, .speed-select:hover background: rgba(255,255,255,0.2);

.progress-container flex: 1; height: 6px; background: rgba(255,255,255,0.3); border-radius: 6px; position: relative; cursor: pointer; A common issue in CodePen demos is the Fullscreen API

.progress-filled width: 0%; height: 100%; background: #e50914; border-radius: 6px; position: relative;

.time-current, .time-duration font-family: monospace; font-size: 14px;

.volume-slider width: 80px; cursor: pointer;

This CSS creates a Netflix-style overlay with a transparent control bar and a red progress indicator.


Become A Member Today!

You will have access to a wide range of benefits that can help you advance your career and stay up-to-date with the latest developments in the field of radiology. These benefits include access to educational resources, networking opportunities with other professionals in the field, opportunities to participate in research projects and clinical trials, and access to the latest technologies and techniques. 

Check out our different membership options.

If you don’t find a fitting membership send us an email here.

Membership

for radiologists, radiology residents, professionals of allied sciences (including radiographers/radiological technologists, nuclear medicine physicians, medical physicists, and data scientists) & professionals of allied sciences in training residing within the boundaries of Europe

  • Reduced registration fees for ECR 1
  • Reduced fees for the European School of Radiology (ESOR) 2
  • Option to participate in the European Diploma. 3
  • Free electronic access to the journal European Radiology 
  • Content e-mails for all ESR journals4
  • Updates on offers & events through our newsletters
  • Exclusive access to the ESR feed in Juisci

€ 11 /year

Yes! That is less than €1 per month.

Free membership

for radiologists, radiology residents or professionals of allied sciences engaged in practice, teaching or research residing outside Europe as well as individual qualified professionals with an interest in radiology and medical imaging who do not fulfil individual or all requirements for any other ESR membership category & former full members who have retired from all clinical practice
  • Reduced registration fees for ECR 1
  • Option to participate in the European Diploma. 3
  • Free electronic access to the journal European Radiology
  • Content e-mails for all ESR journals 4
  • Updates on offers & events through our newsletters
  • Exclusive access to the ESR feed in Juisci

€ 0

The best things in life are free.

ESR Friends

For students, company representatives or hospital managers etc.

  • Content e-mails for all 3 ESR journals 4
  • Updates on offers & events through our newsletters

€ 0

Friendship doesn’t cost a thing.

The membership type best fitting for you will be selected automatically during the application process.

Footnotes:

01

Reduced registration fees for ECR 2027:
Provided that ESR 2026 membership is activated and approved by August 31, 2026.

02
Not all activities included
03
Examination based on the ESR European Training Curriculum (radiologists or radiology residents).
04
European Radiology, Insights into Imaging, European Radiology Experimental.