Enum Class WebMediaError

java.lang.Object
java.lang.Enum<WebMediaError>
one.jpro.platform.media.player.impl.WebMediaError
All Implemented Interfaces:
Serializable, Comparable<WebMediaError>, Constable

public enum WebMediaError extends Enum<WebMediaError>
HTML Audio/Video error codes for the WebMediaPlayer.
Author:
Besmir Beqiri
  • Enum Constant Details

    • MEDIA_ERR_ABORTED

      public static final WebMediaError MEDIA_ERR_ABORTED
      Fetching process aborted by user.
    • MEDIA_ERR_NETWORK

      public static final WebMediaError MEDIA_ERR_NETWORK
      Network error occurred while fetching the media.
    • MEDIA_ERR_DECODE

      public static final WebMediaError MEDIA_ERR_DECODE
      Decoding failed.
    • MEDIA_ERR_SRC_NOT_SUPPORTED

      public static final WebMediaError MEDIA_ERR_SRC_NOT_SUPPORTED
      Unsupported video/audio format
  • Method Details

    • values

      public static WebMediaError[] 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 WebMediaError 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
    • getCode

      public int getCode()
      The error code related to this error.
      Returns:
      the error code
    • getDescription

      public String getDescription()
      The description of this error.
      Returns:
      the description
    • fromCode

      public static Optional<WebMediaError> fromCode(int code)
      Returns the media error from the given code.
      Parameters:
      code - the code
      Returns:
      an optional WebMediaError object