Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4648

Audio supports to add tracks

XMLWordPrintable

      Problem Description

      In order to allow application developers to meet WCAG success criteria including:

      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{
      
      }
      

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified