Expose the fallback language in the API #258
Labels
addition/proposal
i18n-needs-resolution
Issue the Internationalization Group has raised and looks for a response on.
normative change
In #257 I made it possible for the "List of WebVTT Node Objects" object to have an "applicable language", but this can't be exposed in
getCueAsHTML()
since that object maps to aDocumentFragment
, which can't have alang
attribute.One way to make this work is to change from
DocumentFragment
to an HTMLdiv
orspan
element, and setlang
on it if is has an "applicable language".Existing scripts that just insert whatever comes out of
getCueAsHTML()
to the document should continue to work, it would just get an extra element. I supposespan
is a bit more versatile thandiv
because it is allowed in more places (e.g. in ap
element). OTOH, just dumping all cues and have them be separated from each other by default could be nice.An alternative could be to have the fallback language be a property of
TextTrack
, and have JS be responsible for setting alang
attribute on a container element in which it inserts cues withgetCueAsHTML()
.The text was updated successfully, but these errors were encountered: