MediaError

public class MediaError extends Object
implements Parcelable Parcelable

Class for media errors.

Nested Class Summary

class MediaError.Builder Builder for MediaError
@interface MediaError.DetailedErrorCode Detailed media error codes. 

Constant Summary

String ERROR_REASON_APP_ERROR The application state is invalid to fulfill the request.
String ERROR_REASON_AUTHENTICATION_EXPIRED A request cannot be performed because authentication has expired, e.g.
String ERROR_REASON_CONCURRENT_STREAM_LIMIT Too many concurrent streams are detected.
String ERROR_REASON_CONTENT_ALREADY_PLAYING The requested content is already playing.
String ERROR_REASON_CONTENT_FILTERED The content is blocked due to filter.
String ERROR_REASON_DUPLICATE_REQUEST_ID The request ID is not unique (the receiver is processing a request with the same ID).
String ERROR_REASON_END_OF_QUEUE Skip is not possible due to going back beyond the first item or forward beyond the last item in the queue.
String ERROR_REASON_GENERIC_LOAD_ERROR The load request encounter intermittent issue.
String ERROR_REASON_INVALID_COMMAND The command is not valid or not implemented.
String ERROR_REASON_INVALID_MEDIA_SESSION_ID The media session does not exist.
String ERROR_REASON_INVALID_PARAMS The params are not valid or a non optional param is missing.
String ERROR_REASON_INVALID_REQUEST The request is not valid.
String ERROR_REASON_LANGUAGE_NOT_SUPPORTED The requested language is not supported.
String ERROR_REASON_NOT_AVAILABLE_IN_REGION The content is blocked due to being regionally unavailable.
String ERROR_REASON_NOT_SUPPORTED The request is not supported by the application.
String ERROR_REASON_PARENTAL_CONTROL_RESTRICTED The content is blocked due to parental controls.
String ERROR_REASON_PREMIUM_ACCOUNT_REQUIRED Premium account is required for the request to succeed.
String ERROR_REASON_SKIP_LIMIT_REACHED Cannot skip more items due to reaching skip limit.
String ERROR_REASON_VIDEO_DEVICE_REQUIRED The request cannot be completed because a video-capable device is required.
String ERROR_TYPE_ERROR Generic error type, for any other error case.
String ERROR_TYPE_INVALID_PLAYER_STATE Error type indicating the player state is invalid to fulfill the request.
String ERROR_TYPE_INVALID_REQUEST Error type indicating a request is not valid.
String ERROR_TYPE_LOAD_CANCELLED Error type indicating a LOAD request is cancelled by a second incoming LOAD request.
String ERROR_TYPE_LOAD_FAILED Error type indicating a LOAD request failed.

Inherited Constant Summary

Public Method Summary

JSONObject
getCustomData()
Returns the customized object for storing the media error.
Integer
getDetailedErrorCode()
Returns the API-specific detailed error code, or null if not specified.
String
getReason()
Returns the API-specific error reason.
String
getType()
Returns the type of the media error.
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

Constants

public static final String ERROR_REASON_APP_ERROR

The application state is invalid to fulfill the request.

Constant Value: "APP_ERROR"

public static final String ERROR_REASON_AUTHENTICATION_EXPIRED

A request cannot be performed because authentication has expired, e.g. user changed password or the token was revoked.

Constant Value: "AUTHENTICATION_EXPIRED"

public static final String ERROR_REASON_CONCURRENT_STREAM_LIMIT

Too many concurrent streams are detected.

Constant Value: "CONCURRENT_STREAM_LIMIT"

public static final String ERROR_REASON_CONTENT_ALREADY_PLAYING

The requested content is already playing.

Constant Value: "CONTENT_ALREADY_PLAYING"

public static final String ERROR_REASON_CONTENT_FILTERED

The content is blocked due to filter.

Constant Value: "CONTENT_FILTERED"

public static final String ERROR_REASON_DUPLICATE_REQUEST_ID

The request ID is not unique (the receiver is processing a request with the same ID).

Constant Value: "DUPLICATE_REQUEST_ID"

public static final String ERROR_REASON_END_OF_QUEUE

Skip is not possible due to going back beyond the first item or forward beyond the last item in the queue.

Constant Value: "END_OF_QUEUE"

public static final String ERROR_REASON_GENERIC_LOAD_ERROR

The load request encounter intermittent issue.

Constant Value: "GENERIC_LOAD_ERROR"

public static final String ERROR_REASON_INVALID_COMMAND

The command is not valid or not implemented.

Constant Value: "INVALID_COMMAND"

public static final String ERROR_REASON_INVALID_MEDIA_SESSION_ID

The media session does not exist.

Constant Value: "INVALID_MEDIA_SESSION_ID"

public static final String ERROR_REASON_INVALID_PARAMS

The params are not valid or a non optional param is missing.

Constant Value: "INVALID_PARAMS"

public static final String ERROR_REASON_INVALID_REQUEST

The request is not valid.

Constant Value: "INVALID_REQUEST"

public static final String ERROR_REASON_LANGUAGE_NOT_SUPPORTED

The requested language is not supported.

Constant Value: "LANGUAGE_NOT_SUPPORTED"

public static final String ERROR_REASON_NOT_AVAILABLE_IN_REGION

The content is blocked due to being regionally unavailable.

Constant Value: "NOT_AVAILABLE_IN_REGION"

public static final String ERROR_REASON_NOT_SUPPORTED

The request is not supported by the application.

Constant Value: "NOT_SUPPORTED"

public static final String ERROR_REASON_PARENTAL_CONTROL_RESTRICTED

The content is blocked due to parental controls.

Constant Value: "PARENTAL_CONTROL_RESTRICTED"

public static final String ERROR_REASON_PREMIUM_ACCOUNT_REQUIRED

Premium account is required for the request to succeed.

Constant Value: "PREMIUM_ACCOUNT_REQUIRED"

public static final String ERROR_REASON_SKIP_LIMIT_REACHED

Cannot skip more items due to reaching skip limit.

Constant Value: "SKIP_LIMIT_REACHED"

public static final String ERROR_REASON_VIDEO_DEVICE_REQUIRED

The request cannot be completed because a video-capable device is required.

Constant Value: "VIDEO_DEVICE_REQUIRED"

public static final String ERROR_TYPE_ERROR

Generic error type, for any other error case.

Constant Value: "ERROR"

public static final String ERROR_TYPE_INVALID_PLAYER_STATE

Error type indicating the player state is invalid to fulfill the request.

Constant Value: "INVALID_PLAYER_STATE"

public static final String ERROR_TYPE_INVALID_REQUEST

Error type indicating a request is not valid.

Constant Value: "INVALID_REQUEST"

public static final String ERROR_TYPE_LOAD_CANCELLED

Error type indicating a LOAD request is cancelled by a second incoming LOAD request.

Constant Value: "LOAD_CANCELLED"

public static final String ERROR_TYPE_LOAD_FAILED

Error type indicating a LOAD request failed.

Constant Value: "LOAD_FAILED"

Public Methods

public JSONObject getCustomData ()

Returns the customized object for storing the media error.

public Integer getDetailedErrorCode ()

Returns the API-specific detailed error code, or null if not specified.

See MediaError.DetailedErrorCode for details.

This method may return values that are not defined in MediaError.DetailedErrorCode of the receiver SDK has higher version.

public String getReason ()

Returns the API-specific error reason.

The pre-defined reasons are the ERROR_REASON_* constants.

public String getType ()

Returns the type of the media error.

The type must be one of the ERROR_TYPE_* constants.

public void writeToParcel (Parcel out, int flags)