All Implemented Interfaces:
TagBase, AudioAttributable, Serializable, Cloneable

public class Preload extends AbstractAttribute implements AudioAttributable
preload attribute for the element.

 This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:

  none: indicates that the audio should not be preloaded;
  metadata: indicates that only audio metadata (e.g. length) is fetched;
  auto: indicates that the whole audio file could be downloaded, even if the user is not expected to use it;
  the empty string: synonym of the auto value.

 If not set, its default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to metadata.

 
Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • Preload

      public Preload(String value)
      Parameters:
      value - the value for the attribute
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String value)
      sets the value for this attribute
      Parameters:
      value - the value for the attribute.
      Since:
      1.0.0
    • setValue

      public void setValue(boolean updateClient, String value)
      sets the value for this attribute
      Parameters:
      updateClient - true to update client browser page if it is available. The default value is true but it will be ignored if there is no client browser page.
      value - the value for the attribute.
      Since:
      2.1.15
    • getValue

      public String getValue()
      gets the value of this attribute
      Returns:
      the value of the attribute
      Since:
      1.0.0
    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0