Enum Class Preload

java.lang.Object
java.lang.Enum<Preload>
com.oorian.html.elements.consts.Preload
All Implemented Interfaces:
Serializable, Comparable<Preload>, Constable

public enum Preload extends Enum<Preload>
Enumeration defining the preload strategies for audio and video elements. This enum provides type-safe constants for the "preload" attribute, which hints to the browser how much media content should be loaded when the page loads.
Since:
1.0
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • AUTO

      public static final Preload AUTO
      Browser should load the entire media file when the page loads. Suitable for media that is likely to be played.
    • METADATA

      public static final Preload METADATA
      Browser should only load metadata (duration, dimensions, etc.). Suitable for when you want basic info without downloading the full file.
    • NONE

      public static final Preload NONE
      Browser should not preload any media content. Suitable for saving bandwidth when media is unlikely to be played.
  • Method Details

    • values

      public static Preload[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Preload valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Gets the preload strategy value for use in media elements.
      Returns:
      the string value used in HTML preload attribute.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Preload>