- All Implemented Interfaces:
Serializable,Comparable<WebMediaError>,Constable
HTML Audio/Video error codes for the
WebMediaPlayer.- Author:
- Besmir Beqiri
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFetching process aborted by user.Decoding failed.Network error occurred while fetching the media.Unsupported video/audio format -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<WebMediaError> fromCode(int code) Returns the media error from the given code.intgetCode()The error code related to this error.The description of this error.static WebMediaErrorReturns the enum constant of this class with the specified name.static WebMediaError[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MEDIA_ERR_ABORTED
Fetching process aborted by user. -
MEDIA_ERR_NETWORK
Network error occurred while fetching the media. -
MEDIA_ERR_DECODE
Decoding failed. -
MEDIA_ERR_SRC_NOT_SUPPORTED
Unsupported video/audio format
-
-
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
-
getCode
public int getCode()The error code related to this error.- Returns:
- the error code
-
getDescription
The description of this error.- Returns:
- the description
-
fromCode
Returns the media error from the given code.- Parameters:
code- the code- Returns:
- an optional
WebMediaErrorobject
-