Package com.oorian.html.elements.consts
Enum Class Preload
- All Implemented Interfaces:
Serializable,Comparable<Preload>,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Gets the preload strategy value for use in media elements.toString()static PreloadReturns the enum constant of this class with the specified name.static Preload[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
Browser should load the entire media file when the page loads. Suitable for media that is likely to be played. -
METADATA
Browser should only load metadata (duration, dimensions, etc.). Suitable for when you want basic info without downloading the full file. -
NONE
Browser should not preload any media content. Suitable for saving bandwidth when media is unlikely to be played.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
Gets the preload strategy value for use in media elements.- Returns:
- the string value used in HTML preload attribute.
-
toString
-