The specifications for video and audio elements defines two child element types for media elements: <track> and <source>. <source> is used to specify mutliple sources for an element, such as a H.264 and a WebM version of the same video. <track> is used to specify timed text tracks such as subtitles and captions.
Both are supported by MediaElement.js itself. But the current theme function doesn't support any children for the generated <video> and <audio> element. I suggest to support additional variables for both functions to let the caller specify any number of <source> and <track> elements.
Comment | File | Size | Author |
---|---|---|---|
#1 | support-source-and-track-elements-1231182-1.patch | 2.9 KB | pbuyle |
Comments
Comment #1
pbuyle CreditAttribution: pbuyle commentedHere is a patched implementing the suggested features.
Comment #2
mgiffordI can confirm that the patch applies nicely. I haven't verified that the captions work yet, but do think this is an important issue to see is supported.
Comment #3
iadefy CreditAttribution: iadefy commentedI just tried the patch, the caption menu appeared in the control bar. However, the caption is not working, and is showing "English (loading)"...
Comment #4
iadefy CreditAttribution: iadefy commentedI installed the module: jquery_update dev and select jquery 1.7 in configuration, and the subtitle is loading fine :)
Comment #5
CBThe captions will not work unless you add the file types to apache config.
See 'Setup Mime-types' here; http://mediaelementjs.com/
Subtitles will work regardless.
Comment #6
mradcliffeIt would be nice if a multi-value file field could be presented as separate tracks of the same media element, but that may be beyond the scope of this module. As in, it might break current users expectations.
I think it would still be nice to have instead of having to hack in the theme layer.
Comment #7
pbuyle CreditAttribution: pbuyle commented@mradcliffe: This should be handled in a separated issue (IMHO).
Comment #8
iva2k CreditAttribution: iva2k commentedPatch #1 cannot handle "Video for Everybody" case when there is needed a flash object at the end of sources inside <video> tag.
#6, #7, see #1933280: Medialement module should support formatting for Mediaelement.js "Video for Everybody".
Comment #9
icicleking CreditAttribution: icicleking commentedHow do I designate source and track files to be children of the video element? At the theme level or in config?
Comment #10
jnettik