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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pbuyle’s picture

Status: Active » Needs review
FileSize
2.9 KB

Here is a patched implementing the suggested features.

mgifford’s picture

Issue tags: +Accessibility, +caption

I 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.

iadefy’s picture

I just tried the patch, the caption menu appeared in the control bar. However, the caption is not working, and is showing "English (loading)"...

iadefy’s picture

I installed the module: jquery_update dev and select jquery 1.7 in configuration, and the subtitle is loading fine :)

CB’s picture

The 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.

mradcliffe’s picture

It 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.

pbuyle’s picture

@mradcliffe: This should be handled in a separated issue (IMHO).

iva2k’s picture

Patch #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".

icicleking’s picture

How do I designate source and track files to be children of the video element? At the theme level or in config?

jnettik’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)