-
New Feature
-
Resolution: Done
-
Normal
-
9.1.0
Problem Description
In order to allow application developers to meet WCAG success criteria including:
- Understanding Success Criterion 1.2.2 [Captions (Prerecorded)]
- Understanding Success Criterion 1.2.4 [Captions (Live)]
Proposed Specification
static usage
Allow application developers to add HTML elements.
static-track.zul
<audio xmlns:h="native" src="music.mp3"> <h:track kind="captions" srclang="en" src="a.txt"/> <h:track kind="captions" srclang="en" src="b.txt"/> </audio>
dynamic usages
Audio component provides 2 API to set Track.
public void setTracks(List<TrackInfo>){} /** * This method is to deal with the HTML track element's new attributes defined in the future. Then before we add new methods in TrackInfo for the new attribute, developers can set the new attributes with a Json object. */ public void setTracks(List<JSONAware>){}
/** * A data object that contains information to render <track> element (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track) * It provides setter and getter for attributes e.g. setSrc(), setKind() * We name it TrackInfo instead of Track to avoid future name conflict. In case we will create a Track component in the future. */ public class TrackInfo{ }
- relates to
-
ZK-4649 Video supports to add tracks
- Closed