/**
* The chromecast error code, represented by a value from the following list:
*
- `'CANCEL'`: The operation was canceled by the user.
*
- `'TIMEOUT'`: The operation timed out.
*
- `'API_NOT_INITIALIZED'`: The API is not initialized.
*
- `'INVALID_PARAMETER'`: The parameters to the operation were not valid.
*
- `'EXTENSION_NOT_COMPATIBLE'`: The API script is not compatible with the installed Cast extension.
*
- `'EXTENSION_MISSING'`: The Cast extension is not available.
*
- `'RECEIVER_UNAVAILABLE'`: No receiver was compatible with the session request.
*
- `'SESSION_ERROR'`: A session could not be created, or a session was invalid.
*
- `'CHANNEL_ERROR'`: A channel to the receiver is not available.
*
- `'LOAD_MEDIA_FAILED'`: Load media failed.
*
* @remarks
*
- The error codes correspond to the error codes documented in the {@link https://developers.google.com/cast/docs/reference/chrome/chrome.cast.html#.ErrorCode | Chromecast API reference}.
*
* @public
*/
export type ChromecastErrorCode =
| 'CANCEL'
| 'TIMEOUT'
| 'API_NOT_INITIALIZED'
| 'INVALID_PARAMETER'
| 'EXTENSION_NOT_COMPATIBLE'
| 'EXTENSION_MISSING'
| 'RECEIVER_UNAVAILABLE'
| 'SESSION_ERROR'
| 'CHANNEL_ERROR'
| 'LOAD_MEDIA_FAILED';
/**
* An error that occurred while casting or attempting to cast to Chromecast.
*
* @public
*/
export interface ChromecastError {
/**
* The error code of the error.
*/
errorCode: ChromecastErrorCode;
/**
* The human-readable description of the error.
*/
description: string;
}