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

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.

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.

Related

How to use <span> or <p> to display video subtitles

I was wondering how I could possibly use <span> or <p> tag to display video subtitle text (.vtt / .srt) in a <video> tag in HTML?
I have searched all over the internet but couldn't find solution.
I want to use a captioning system similar to that YouTube has, I also tried reverse-engineering a YouTube video page via inspect element but still no luck.
Any help is highly appreciated, thanks!
The <track> tag specifies text tracks for or elements.
This element is used to specify subtitles, caption files or other files containing text, that should be visible when the media is playing.
Tracks are formatted in WebVTT format (.vtt files).

How does html5 video tag works? Is there any way to see how it is implemented

I am developing an application where I need to display some animation in the canvas along with the video as a separate element, for the same I need to maintain the synchronisation between two DOM elements very precisely.
I was thinking of playing the animation as video tag plays the video. Is there any way I could see how the html5 video tag is implemented?
Theoretically, each browser can have their own implementation of the video tag. Besides of that, they will try their best to follow some rules specified by w3.org
This is the video tag draft:
https://www.w3.org/TR/2011/WD-html5-20110113/video.html#video
If yout want to sync something with a video you will want to use some video tag events:
https://www.w3.org/2010/05/video/mediaevents.html
A timeupdate event listener can be set on the video which will allow you to synchronize other elements on the page with the video as it plays. Video elements have many other events in addition to timeupdate, such as play, pause, and seeking.
The implementation of video elements will differ depending on the browser and may not be completely public, such as how they work with DRM.

Making a video element with no sound accessible

I am currently working on a web page with a silent video banner.
I am using the aXe Chrome browser plugin that highlights potential accessibility issues with the content of the page and it's throwing two issues related accessibility for the video element:
Ensure <video> elements have captions
Ensure <video> elements have audio descriptions
I just wanted to know if there are any recommendations in communicating that the video element has no audio in an accessible way.
video accessibility has two concerns : captions for replacing sound, and audio decription (or textual alternatives) for describing the images.
The fact that your video is silent does not mean that you do not need a textual description of what appears in the video.
In your case, I would look at the attribute controls="muted" which can be an hint for indicating assistive technologies that a video does not have currently any sound.
I will choose between one of the following:
a) I will set the aria-describedby attribute on the video element to point to the div containing the description.
b) OR If your video is only decorative, then I would set the aria-hidden=true attribute on a parent element

Is it possible to move an HTML5 video CC under the video?

A client wants the subtitles out of the way of the video, so they want it underneath the video. We are using vtt files for our captions. Can this be done in CSS? Maybe some settings in the vtt file?
short answer... no.
longer answer... you could parse the vtt and manually display the captions outside the <video> tag, there are a few JS libraries out there to do this (eg Mozilla have a very thorough implementation, though depending on your captions you may be able to get away with something a lot more lightweight)

Can I dispay more than one video in the HTML 5 video element?

I’m using the HTML5 video element to display video on my asp.net page.
How can I display multiple videos one by one?
You need to set the change the src attribute of the video once the each video is ended.
Check out my fiddle where I have done this: JSFiddle