Fullscreen Control via esm.sh

Import the class and register it once. See the README for the full API.

This page pins the class module’s version. CDN failure or disabled JavaScript leaves the native video controls available. Use Escape or browser controls to exit fullscreen.

Class-only import

<script type="module">
  import { FullscreenControlElement } from
    'https://esm.sh/@aarongustafson/fullscreen-control@2.0.7/fullscreen-control.js?bundle&target=es2022';
  if (!customElements.get('fullscreen-control')) {
    customElements.define('fullscreen-control',
      FullscreenControlElement);
  }
</script>
<fullscreen-control>
  <video src="./sample.webm" controls
    aria-label="Moving circle"></video>
</fullscreen-control>

Silent clip: a circle moves left to right across a rectangle; no audio. Open the sample clip.