Enum Class Media.Preload

java.lang.Object
java.lang.Enum<Media.Preload>
com.vaadin.flow.component.html.Media.Preload
All Implemented Interfaces:
Serializable, Comparable<Media.Preload>, Constable
Enclosing class:
Media

public static enum Media.Preload extends Enum<Media.Preload>
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:
  • Enum Constant Details

    • AUTO

      public static final Media.Preload AUTO
      The browser may download the whole file even if the visitor never plays it.
    • METADATA

      public static final Media.Preload 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

      public static final Media.Preload 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

      public static Media.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 Media.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 value used for the preload attribute.
      Returns:
      the attribute value