Package com.vaadin.flow.component.html
Enum Class Media.Preload
- All Implemented Interfaces:
Serializable,Comparable<Media.Preload>,Constable
- Enclosing class:
Media
How much of the media file the browser should fetch before playback is
asked for.
This is a hint and nothing more: a browser is free to ignore it, and what it does when no preload is set differs between browsers. Use it to keep a page with several players from downloading all of them at once, not to guarantee that a file is or is not fetched.
- 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 value used for thepreloadattribute.static Media.PreloadReturns the enum constant of this class with the specified name.static Media.Preload[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
The browser may download the whole file even if the visitor never plays it. -
METADATA
Only the metadata — duration, dimensions, the first frame — is fetched. Playback then starts with a short delay, but the player can already show how long the recording is. -
NONE
Nothing is fetched until playback starts. The cheapest option for a page that embeds a player the visitor is not expected to use.
-
-
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 value used for thepreloadattribute.- Returns:
- the attribute value
-