Package com.theoplayer.android.api.error
Class ContentProtectionException
-
- All Implemented Interfaces:
-
java.io.Serializable
public class ContentProtectionException extends THEOplayerException
A THEOplayer exception that gives an informative description of the content-protection error that occurred.
-
-
Constructor Summary
Constructors Constructor Description ContentProtectionException(ErrorCode code, String message, String url, int status, String statusText, String response, int systemCode)
Constructs a content-protection exception that can be thrown by the player. ContentProtectionException(ErrorCode code, String message, Throwable cause, String url, int status, String statusText, String response, int systemCode)
Constructs a content-protection exception that can be thrown by the player.
-
Method Summary
Modifier and Type Method Description String
getUrl()
The URL that was used in the request. int
getStatus()
The status code from the HTTP response. String
getStatusText()
A textual description regarding the status from the HTTP response. String
getResponse()
A textual representation of the body of the HTTP response. -
Methods inherited from class com.theoplayer.android.api.error.THEOplayerException
getCategory, getCode
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ContentProtectionException
ContentProtectionException(ErrorCode code, String message, String url, int status, String statusText, String response, int systemCode)
Constructs a content-protection exception that can be thrown by the player.- Parameters:
code
- The ErrorCode of the exception.message
- A textual description of the exception.url
- The URL that was used in the request.status
- The status code.statusText
- A textual description regarding the status.response
- A textual description of the response.systemCode
- The internal error code from the CDM.
-
ContentProtectionException
ContentProtectionException(ErrorCode code, String message, Throwable cause, String url, int status, String statusText, String response, int systemCode)
Constructs a content-protection exception that can be thrown by the player.- Parameters:
code
- The ErrorCode of the exception.message
- A textual description of the exception.cause
- The cause of the exception.url
- The URL that was used in the request.status
- The status code.statusText
- A textual description regarding the status.response
- A textual description of the response.systemCode
- The internal error code from the CDM.
-
-
Method Detail
-
getUrl
@Nullable() String getUrl()
The URL that was used in the request.
- Only available when getCode is CONTENT_PROTECTION_CERTIFICATE_ERROR or CONTENT_PROTECTION_LICENSE_ERROR.
- Returns:
The URL that was used in the request. (Nullable)
-
getStatus
int getStatus()
The status code from the HTTP response.
- Only available when getCode is CONTENT_PROTECTION_CERTIFICATE_ERROR or CONTENT_PROTECTION_LICENSE_ERROR.
- Returns:
The status code from the HTTP response.
-
getStatusText
@Nullable() String getStatusText()
A textual description regarding the status from the HTTP response.
- Only available when getCode is CONTENT_PROTECTION_CERTIFICATE_ERROR or CONTENT_PROTECTION_LICENSE_ERROR.
- Returns:
The status text from the HTTP response. (Nullable)
-
getResponse
@Nullable() String getResponse()
A textual representation of the body of the HTTP response.
- Only available when getCode is CONTENT_PROTECTION_CERTIFICATE_ERROR or CONTENT_PROTECTION_LICENSE_ERROR.
- Returns:
The body of the HTTP response. (Nullable)
-
-
-
-