Package com.amazonaws.ivs.player
Class PlayerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.amazonaws.ivs.player.PlayerException
- All Implemented Interfaces:
Serializable
Represents an error that occurred during media playback. The exception has additional properties
that can uniquely identify the exception.
Some valuable errors to handle:
- source: MasterPlaylist type:
ErrorType.ERROR_AUTHORIZATIONcode: 403 - This is a private stream and viewer authorization is missing or invalid. - source: MasterPlaylist type:
ErrorType.ERROR_NOT_AVAILABLEcode: 429 - The concurrent-viewers limit has been reached. See Amazon IVS Service Quotas. - source: MasterPlaylist type:
ErrorType.ERROR_NOT_AVAILABLEcode: 404 - The stream is invalid (e.g., the playback URL is incorrect) or not online.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns the code representing the specific error condition.Returns a message describing the error.Returns the result code for the error.Returns the source component within the player that generated the error.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getCode
public int getCode()Returns the code representing the specific error condition. The code values depend on the source and result types. For example, ifgetSource()is "Segment", the result isErrorType.ERROR_NETWORK, and the code value is 400, this indicates that an HTTP 400 error occurred while trying to download a video segment. -
getSource
Returns the source component within the player that generated the error. -
getErrorType
Returns the result code for the error. -
getErrorMessage
Returns a message describing the error. This differs fromThrowable.getMessage()in that this contains only the error text and not any source or code value.
-