When embedding video content in ePUB files, follow these accessibility practices:


Enabling native controls with the controls attribute

Ensure users can play, pause, or adjust videos through standard device controls.


<video controls="controls">

  <source

      src="video/the_general.webm"

      type="video/webm"/>

  <source

      src="video/the_general.mp4"

      type="video/mp4"/>

  …

</video>


Including more than one video option using the source element

Include compatible formats like MP4 and WebM for broader accessibility.


<video controls="controls">


  <source

      src="video/the_general.webm"

      type="video/webm"/>

  <source

      src="video/the_general.mp4"

      type="video/mp4"/>

  …

</video>


Including timed tracks

Use the <track> element to include subtitles for better accessibility.


<video controls="controls">

      src="video/big-hollywood-blockbuster.mp4"

      controls="controls">

  <track

      kind="subtitles"

      src="subtitles.en.vtt"

      srclang="en"

      label="English"/>

  <track

      kind="captions"

      src="captions.en.vtt"

      srclang="en"

      label="English"/>

</video>


Including a poster image

Set a placeholder image to display before the video loads.


<video

  src="video/the_general.mp4"

  poster="graphics/the_general.jpg"

  controls="controls">

  …

</video>


Including a fallback error message

Provide descriptive text or links for unsupported devices.


<video

      src="video/the_general.mp4"

      controls="controls">

  …

  <div class="err">

     <p>

        Sorry, it appears your system

        either does not support video

        playback or cannot play the

        MP4 format provided.

     </p>

  </div>

</video>

 

Need help? reach out to us by emailing [email protected].