.. list-table:: Castlabs player error codes
   :header-rows: 1
   :widths: 30 8 62

   * - Constant
     - Code
     - Description
   * - ``TYPE_UNKNOWN``
     - ``0``
     - Error raised with an unknown type
   * - ``TYPE_AUDIO_TRACK_INITIALIZATION``
     - ``1``
     - Error raised when the track can not be initialized. The cause of
       this error is a ``com.google.android.exoplayer2.audio.AudioSink.InitializationException`` that
       contains the audio track state reported by ``android.media.AudioTrack#getState()``.
       This is reported as ``#SEVERITY_ERROR`` since this means that no audio playback will
       be possible.
   * - ``TYPE_AUDIO_DECODER_INITIALIZATION``
     - ``2``
     - Error raised when the audio decoder can not be initialized. The cause of
       this error is a ``com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException``.
       This is reported as ``#SEVERITY_ERROR`` since this means that no audio playback will
       be possible.
   * - ``TYPE_AUDIO_WRITE_ERROR``
     - ``3``
     - Raised when an error occurs while writing to the audio track. The cause of
       this error is a ``com.google.android.exoplayer2.audio.AudioSink.WriteException`` that
       exposes the ``com.google.android.exoplayer2.audio.AudioSink.WriteException#errorCode``
       that is returned from ``android.media.AudioTrack#write(byte[], int, int)``
       This is reported as ``#SEVERITY_WARNING`` since it might be possible that
       audio playback will recover.
   * - ``TYPE_AUDIO_DECRYPTION_ERROR``
     - ``4``
     - Raised when an error occurs while decrypting audio data. The cause of
       this error is a ``MediaCodec.CryptoException`` that exposes an error code using
       ``MediaCodec.CryptoException#getErrorCode()``. The error code reported by the cause
       is one of ``MediaCodec.CryptoException#ERROR_NO_KEY``,
       ``MediaCodec.CryptoException#ERROR_INSUFFICIENT_OUTPUT_PROTECTION``,
       ``MediaCodec.CryptoException#ERROR_KEY_EXPIRED``,
       ``MediaCodec.CryptoException#ERROR_RESOURCE_BUSY``,
       or ``MediaCodec.CryptoException#ERROR_SESSION_NOT_OPENED``
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_VIDEO_DECODER_INITIALIZATION``
     - ``5``
     - Raised when the video decoder can not be initialized. The cause of
       this error is a ``com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException``.
       This is reported as ``#SEVERITY_ERROR`` since this means that no video playback will
       be possible.
   * - ``TYPE_VIDEO_DECRYPTION_ERROR``
     - ``6``
     - Raised when an error occurs while decrypting audio data. The cause of
       this error is a ``MediaCodec.CryptoException`` that exposes an error code using
       ``MediaCodec.CryptoException#getErrorCode()``. The error code reported by the cause
       is one of ``MediaCodec.CryptoException#ERROR_NO_KEY``,
       ``MediaCodec.CryptoException#ERROR_INSUFFICIENT_OUTPUT_PROTECTION``,
       ``MediaCodec.CryptoException#ERROR_KEY_EXPIRED``,
       ``MediaCodec.CryptoException#ERROR_RESOURCE_BUSY``,
       or ``MediaCodec.CryptoException#ERROR_SESSION_NOT_OPENED``
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_MANIFEST_LOADING_FAILED``
     - ``7``
     - This error type is raised when loading the player manifest (i.e. the DASH mpd, or
       the HLS playlist) failed. The cause of this error is an ``java.io.IOException``.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_SDK_INIT_ERROR``
     - ``8``
     - Error raised when the SDK could not be initialised successfully. The cause of the error is
       a ``Throwable``.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_NO_RENDERER_FOUND``
     - ``9``
     - Error raised when no plugin was found that can be used to create a renderer to playback a
       given DRM and content combination. An error of this type will be raised for example
       if you are trying to playback a DASH stream using OMA-DRM but the OMA-Plugin was not loaded.
       It is possible also that this Exception is thrown if a Renderer has been temporarily
       disabled. A few use cases, such as performing background playback ,can disable a
       number of Renderers.
       This error has no cause attached to it.
       This is reported as ``#SEVERITY_WARNING``.
   * - ``TYPE_NO_PLAYABLE_CONTENT``
     - ``10``
     - Error raised when the applied filters were not able to find any viable content that can
       be displayed on the current device. This can happen for example when you are trying to
       playback 4K video on a device that does not support it and 4K is the *only* representation
       found in the Manifest.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_PLAYBACK_ERROR``
     - ``11``
     - Error raised when the ExoPlayer reports a general playback error. The cause of this
       error is a ``ExoPlaybackException``.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_API_MISMATCH``
     - ``12``
     - This error is raised if a method is called that is not supported on the current API level.
       This will for example be triggered if you try to use Widevine DRM on devices that do not
       support it.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_UNSUPPORTED_DRM``
     - ``13``
     - This error is raised if you are trying to use a DRM system that is not supported by the
       device. The cause if this error is a ``UnsupportedDrmException``.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_SDK_NOT_INITIALIZED``
     - ``14``
     - Error raised when the SDK was not initialized using one of ``com.castlabs.android.PlayerSDK#init(Context)``
       or ``com.castlabs.android.PlayerSDK#init(Context, LicenseLoader)``.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_DRMTODAY_EXCEPTION``
     - ``15``
     - This error is raised if an exception occurred while the player was communicating with
       DRMToday to fetch a license. The cause of this error is a
       ``com.castlabs.android.drm.DrmTodayException``.
       **Note** that this error usually occurs during license acquisition and before any
       decryption errors are reported by the decoder.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_DOWNLOAD_ERROR``
     - ``16``
     - This error is raised if an exception occurred while downloading playback data. The cause
       of this error is a ``DownloadException`` that you can use to identify the root cause
       and the id of the track that caused the error.
       This is reported as ``#SEVERITY_WARNING`` since it depends on where and when this
       exception is raised.
   * - ``TYPE_SECONDARY_DISPLAY``
     - ``17``
     - This error is raised if a secondary display is detected and the current configuration
       does not permit playback on that display.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_KEY_EXPIRED``
     - ``18``
     - This error is raised if a DRM key expires during playback.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_DRM_KEY_DOWNLOAD_ERROR``
     - ``19``
     - This error is raised if a DRM key could not be fetched successfully. This is usually caused
       when offline lincenses are loaded.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_CONNECTIVITY_LOST_ERROR``
     - ``20``
     - This error is raised if an exception occurred while downloading playback and no network
       connectivity is available.
       This is reported as ``#SEVERITY_WARNING`` and the player will automatically try to
       recover once connectivity is re-gained. This can be treated as in informative warning.
   * - ``TYPE_CONNECTIVITY_GAINED_INFO``
     - ``21``
     - This exception is raised after the player lost connectivity (``#TYPE_CONNECTIVITY_LOST_ERROR``),
       once connectivity was re-gained.
       This is reported as ``#SEVERITY_INFO`` and can be treated as in informative message.
   * - ``TYPE_BEHIND_LIVE_WINDOW``
     - ``22``
     - Error raised when the current playback position is behind the live edge in a live stream.
       The cause of this error is a ``com.google.android.exoplayer2.source.BehindLiveWindowException``.
       When this error is raised, the player is in a fatal state and you will need to restart/reopen
       the stream to continue playback at the live edge.
       Typically, this error is caused by loss of connectivity where the player is not able to
       keep updating the manifests to stay at the live edge or within the live window.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_INVALID_PLAYER_LICENSE``
     - ``23``
     - Error raised when the Castlabs player license is invalid or expired. Please contact
       support if you see this error unexpectedly. Note that if this error occurs, playback is
       prevented and the player will stop working.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_DATA_DOWLOAD_ERROR``
     - ``24``
     - This error is raised if an exception occurred while downloading data. The cause
       can be used to identify the root cause. In contrast to ``#TYPE_DOWNLOAD_ERROR``
       this type is raised for any download issues around non track specific data.
       This is reported as ``#SEVERITY_WARNING`` since it depends on where and when this
       exception is raised.
       This type might contain the ``#URL`` key in the ``#errorData`` bundle.
   * - ``TYPE_DRM_EXCEPTION``
     - ``25``
     - This error is raised if an exception occurred while the player was communicating with
       DRM server to fetch a license. The cause of this error is a
       ``com.google.android.exoplayer2.drm.DrmSession.DrmSessionException``.
       **Note** that this error usually occurs during license acquisition and before any
       decryption errors are reported by the decoder.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_AUDIO_UNSUPPORTED``
     - ``26``
     - This error is raised if all audio tracks are filtered out as unsupported.
       It is reported as ``#SEVERITY_WARNING``
   * - ``TYPE_VIDEO_UNSUPPORTED``
     - ``27``
     - This error is raised if all video tracks are filtered out as unsupported.
       It is reported as ``#SEVERITY_WARNING``
   * - ``TYPE_TEXT_UNSUPPORTED``
     - ``28``
     - This error is raised if all text tracks are filtered out as unsupported.
       It is reported as ``#SEVERITY_WARNING``
   * - ``TYPE_USER_ID_NOT_PROVIDED``
     - ``29``
     - Error raised when the userID is mandatory and has not been provided.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_MANIFEST_PARSING_FAILED``
     - ``30``
     - This error type is raised when parsing the player manifest (i.e. the DASH mpd, or
       the HLS playlist) failed. The cause of this error is an ``com.google.android.exoplayer2.ParserException``.
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_AD_REQUEST_UNSUPPORTED``
     - ``31``
     - Error raised when trying to play Ads but the current Player setup doesn't support it.
       This is the case when using a ``SingleControllerPlaylist``
       and informing ``com.castlabs.android.player.PlayerConfig#adRequest``.
       This is reported as ``#SEVERITY_WARNING``
   * - ``TYPE_DRM_PROVISION_ERROR``
     - ``32``
     - Error raised during device provisioning
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_CSL_LIMIT_REACHED``
     - ``33``
     - Error raised when concurrent stream limiting reaches maximum clients
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_CSL_NETWORK_ERROR``
     - ``34``
     - Error raised when there's a network error with the concurrent  stream limiting service
       This is reported as ``#SEVERITY_ERROR``.
   * - ``TYPE_HDCP_CONNECTION_WARNING``
     - ``35``
     - This exception is raised after the player sees changes in HDCP connectivity.
       This is reported as ``#SEVERITY_INFO`` and can be treated as in informative message.
   * - ``TYPE_AD_ERROR``
     - ``36``
     - This error is raised when a general error occurs at initializing
       or during an Ad.
   * - ``TYPE_DNS_SERVER_ERROR``
     - ``37``
     - This error is raised when a DNS server error occurs.
   * - ``TYPE_TIME_OUT_ERROR``
     - ``38``
     - This error is raised when a timeout error occurs.
   * - ``TYPE_MANIFEST_INVALID``
     - ``39``
     - This error happens when the player found a semantic issue with a Manifest. This could be
       due to a change in between manifest updates deemed as illegal by the corresponding spec.
   * - ``TYPE_TUNNELING_ERROR``
     - ``40``
     - This error happens when tunneling mode can not be enabled on a device and the playback in
       non-tunneling mode continues.
       It is reported as ``#SEVERITY_WARNING`` and can be treated as an informative message.
   * - ``TYPE_VIDEO_BLOCKLIST_FAILED``
     - ``41``
     - This error is raised when video quality blocklisting fails as the current quality is the only
       video quality left for playback.
       It is reported as ``#SEVERITY_WARNING``
