Search code examples
html5-audiowebvtt

Is it possible to use ttml or vtt with the html 5 audio element?


Using the display vtt or ttml as a track element with the html 5 audio tag without the use of javascript? I.E. is there a way to display the vtt or ttml as closed cationioning in the audio tag? I'm trying to display podcast transcripts, just fyi.


Solution

  • According to MDN, any track elements inside an audio element are ignored. Apparently since there is no visual area on an audio element like there is on video, there is no way to display it. The suggestion I found was to just use a video element -- you can pass it an audio file and it will play it. You then just use CSS to size the element as needed, and to style the audio cues.