Home Work
SaaS developmentAI developmentAPI developmentMobile app developmentGoogle Ads managementHeadless ShopifyLaravel developmentNext.js developmentReact developmentTypeScript engineeringUI/UX designSEO & AEOEcommerce development
AI solutionsB2B platformsE-commerceHospitalityLead generationLogisticsEducationProcess automationSaaS platformsStartup MVPReal estateHealthcare
LegalHealthcareReal estateFinanceHospitality
The HagueRotterdamAmsterdamUtrechtEindhovenAlmereBredaArnhemNijmegenTilburgEnschedeGroningenLeidenDelftZoetermeerDen Bosch
Studio
AboutProcessLabBlogContact

Videospeler met eigen bediening New

A custom video player around the plain video element: play, timeline, time, mute and volume, captions on or off and fullscreen. During playback the controls hide after 2.5 seconds of inactivity and return on mouse or focus. Shortcuts: space or k, arrows (5 s), m, c and f. Captions come from a text track (built in the JS here, a .vtt file in production). For company films and product videos where the default player clashes with the brand.

0:00 / 0:22

How to use it

  1. Paste the HTML where the components should appear.
  2. Add the CSS to your stylesheet. All classes are prefixed, so nothing clashes with your own styles.
  3. Add the JavaScript and call init() with the element that contains the HTML.
<!-- Videospeler met eigen bediening · NedDev · eigen werk. -->
<div class="jouw-container">
<div class="vsp" tabindex="-1">
<video class="vsp__v" preload="metadata" playsinline poster="https://neddev.com/lab-media/videospeler-eigen-1.webp" aria-label="Bedrijfsfilm Houtwerkplaats Van Dijk, 22 seconden"><source src="https://neddev.com/lab-media/videospeler-eigen-film.mp4" type="video/mp4"></video>
<p class="vsp__cc" hidden></p>
<button class="vsp__big" type="button" aria-label="Film afspelen"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5.5v13l10.5-6.5z"/></svg></button>
<div class="vsp__bar">
<button class="vsp__b vsp__play" type="button" aria-label="Afspelen"><svg class="vsp__ic-play" viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5.5v13l10.5-6.5z"/></svg><svg class="vsp__ic-pause" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 5h3.5v14H7zM13.5 5H17v14h-3.5z"/></svg></button>
<input class="vsp__tl" type="range" min="0" max="22" step="0.1" value="0" aria-label="Tijdlijn" aria-valuetext="0:00 van 0:22">
<span class="vsp__t"><span class="vsp__cur">0:00</span> / <span class="vsp__dur">0:22</span></span>
<button class="vsp__b vsp__mute" type="button" aria-label="Geluid uit" aria-pressed="false"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z"/><path class="vsp__wave" d="M15 9c1.3 1.6 1.3 4.4 0 6M17.5 6.8c2.6 2.9 2.6 7.5 0 10.4" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path class="vsp__x" d="M15.5 9.5l5 5m0-5l-5 5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg></button>
<input class="vsp__vol" type="range" min="0" max="1" step="0.05" value="0.8" aria-label="Volume">
<button class="vsp__b vsp__ccb" type="button" aria-label="Ondertiteling" aria-pressed="false"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="5.5" width="18" height="13" rx="2" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M10.5 10.3a2.2 2.2 0 1 0 0 3.4M17 10.3a2.2 2.2 0 1 0 0 3.4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg></button>
<button class="vsp__b vsp__fs" type="button" aria-label="Volledig scherm"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" fill="none" stroke="currentColor" stroke-width="1.9"/></svg></button>
</div>
</div>
</div>

More components

Seen something you like?

Add it to your selection and send it over. We build your site around it, in your brand.

Get in touch →