Documentation

Error Management

Error and warning reporting

Error API events

error

The player has encountered a fatal error and cannot recover from it. This will result in an error message being displayed to the viewer. This error message can be tuned through player labels

warning

The player has encountered a non-fatal error. Either it could recover from the error or this warning may not interfere with playback (but may make some features unavailable)

Error API methods

errorData getter (ErrorData)

const errorData = rmp.errorData;

This getter returns an ErrorData Object representing the error that was just emitted by the player. This ErrorData Object will have the following properties:

{
  code: Number, // the error number
  message: String, // the error message
  event: (Object|null), // the native DOM error or library-specific event if available
}

warningData getter (WarningData)

const warningData = rmp.warningData;

This getter returns an WarningData Object representing the warning (non-fatal error) that was just emitted by the player. This WarningData Object will have the following properties:

{
  code: Number, // the warning number
  message: String, // the warning message
  event: (Object|null), // the native DOM warning or library-specific event if available
}

Error player setting

errorOnlyShowCustomText: Boolean

By default, when a fatal error is detected the player will display the following data: error code, error details and custom error message (as read in hint.error.customErrorMessage label). Setting errorOnlyShowCustomText to true will hide error code, error details to only show custom error message. Default: false.

Error codes and messages

error

For values obtained through the errorData getter:

  • 100: error on HTML5 media element
  • 104: invalid license key
  • 105: cannot find player container element on page
  • 106: cannot find player container PARENT on page
  • 107: no playback support
  • ---
  • 200: failed to load required library hls.js
  • 201: hls.js fatal error - general error
  • 202: Google IMA DAI backup stream not provided
  • 203: hls.js fatal error - manifest parsing error
  • 204: hls.js fatal error - network error
  • 205: hls.js fatal error - incompatible codecs error
  • 206: hls.js fatal error - decoding media error
  • ---
  • 300: failed to load required library Shaka player
  • 301: Shaka player fatal error
  • 302: cannot use Shaka player in this environment
  • 303: Shaka player fatal error - error from the network stack
  • 304: Shaka player fatal error - error from parsing text streams
  • 305: Shaka player fatal error - error parsing or processing audio or video streams
  • 306: Shaka player fatal error - error parsing the manifest
  • 307: Shaka player fatal error - error related to streaming
  • 308: Shaka player fatal error - errors related to DRM
  • 309: Shaka player fatal error - error in the database storage (offline)
  • ---
  • 500: failed to load required library three.js (360 video)
  • ---
  • 600: FairPlay failed to retrieve the server certificate
  • 601: FairPlay key system not supported
  • 602: FairPlay could not create MediaKeys
  • 603: FairPlay could not create key session
  • 604: FairPlay license request failed
  • ---
  • 700: failed at loading playlistLoc URI
  • 701: failed at parsing JSON playlist
  • 702: failed at parsing JSON playlist - no playlist property
  • 703: empty playlist - exit
  • 704: cannot append playlist layout - missing rmp-playlist-container container
  • 705: failed at setPlaylistData - invalid input
  • 706: failed at setPlaylistData - internal error
  • 707: failed at setPlaylistLoc - invalid input
  • 708: failed at setPlaylistLoc - internal error
  • 709: failed at setPlaylistItem - error while trying to load and play new item
  • 710: failed at loading relatedLoc URI
  • 711: failed at parsing JSON related
  • 712: failed at parsing JSON related - no playlist property
  • 713: empty related list - exit
  • 714: failed at setRelatedData - invalid input
  • 715: failed at setRelatedData - internal error
  • 716: failed at setRelatedLoc - invalid input
  • 717: failed at setRelatedLoc - internal error
  • 718: failed at setRelatedItem - error while trying to load and play new item
  • ---
  • 800: cannot append transcript layout - wrong HTML layout
  • 801: cannot get transcript VTT file from server
  • 802: 'not a valid WebVTT file - error

warning

For values obtained through the warningData getter:

  • 1000: failed to load logo at provided URI
  • 1001: failed to load poster at provided URI
  • 1002: failed to load animated poster at provided URI
  • 1003: invalid input for this API call
  • 1004: player not ready - cannot execute API call
  • 1005: autoplay requested but player failed at playing content
  • 1006: init method already called for this player instance - exit
  • 1009: failed to enter picture to picture mode
  • 1010: warning on HTML5 media element
  • 1011: videoPlayPromise on content has failed - error message follows
  • 1012: not ready - cannot initiate playback - exit
  • 1013: destroy method currently running - wait for destroycompleted event
  • 1014: internal - call to play() API Promise has rejected - error message follows
  • 1015: internal - call to stop() API Promise has rejected - error message follows
  • 1016: internal - call to seekTo() API Promise has rejected - error message follows
  • 1017: internal - call to setFullscreen() API Promise has rejected - error message follows
  • 1018: internal - call to dvrSeekTo() API Promise has rejected - error message follows
  • 1019: internal - internal - call to syncToLiveEdge() API Promise has rejected - error message follows
  • 1020: internal - call to loadAds() API Promise has rejected - error message follows
  • 1021: internal - call to stopAds() API Promise has rejected - error message follows
  • 1022: internal - call to destroy() API Promise has rejected - error message follows
  • 1023: internal - call to setPlaylistItem() API Promise has rejected - error message follows
  • 1024: internal - call to setRelatedItem() API Promise has rejected - error message follows
  • 1025: internal - call to setSrc() API Promise has rejected - error message follows
  • 1026: cannot use setPlayerSize when player is in fullscreen - exit
  • 1027: cannot use setPlayerSize with autoHeightMode or iframeMode settings - exit
  • 1028: failed at locking orientation to landscape
  • 1031: cannot use seekTo with a live stream - exit
  • 1032: cannot use seekTo while a linear ad is playing - exit
  • 1033: to seek into a DVR stream use dvrSeekTo method - exit
  • 1034: seekTo error trying to set currentTime on HTML5 media element
  • 1035: dvrSeekTo requires a DVR stream - exit
  • 1036: cannot use dvrSeekTo while a linear ad is playing - exit
  • 1037: cannot use syncToLiveEdge while a linear ad is on stage - exit
  • 1038: cannot use dvrSeekTo - invalid content duration - exit
  • 1040: cannot use seekToFrame - content is not on-demand - exit
  • 1041: cannot use seekToFrame - invalid currentTime or duration - exit
  • 1050: cannot use quality setter while a linear ad is playing
  • ---
  • 2000: hls.js warning
  • ---
  • 3000: Shaka player warning
  • 3001: storage has not been initialized
  • 3002: could not download offline content
  • 3003: could not list offline downloaded content
  • 3004: could not remove offline downloaded content
  • 3005: could not load offline content - invalid input
  • 3006: could not query temporary storage usage and availability
  • 3007: offline storage is not supported in this environment
  • 3008: could not abort download of offline content
  • 3009: could not get Shaka Player thumbnails - no thumbnail will be displayed
  • ---
  • 4000: failed to load vtt.js
  • 4001: vtt.js parsing error
  • 4002: failed to load text track
  • 4003: all text tracks could not be loaded - only those available will be presented to the viewer
  • ---
  • 6000: FairPlay decryption key error was encountered
  • 6001: FairPlay video playback error occured
  • ---
  • 7000: playlistCallback failed
  • 7001: cannot call setPlaylistItem - no initial playlist input
  • 7010: relatedCallback failed
  • 7011: cannot call setRelatedItem - no initial related input
  • ---
  • 8000: failed to load VTT thumbnail file
  • 8001: failed to load sprite image
  • 8002: not a valid VTT thumbnail file - no further action taken
  • 8003: could not parse thumbnails VTT file - corrupted data found
  • ---
  • 9000: error parsing JSON for custom icons
  • 9001: error loading JSON for custom icons
  • ---
  • 10000: failed to load optional library rmp-vast - no ad will be shown
  • 10001: failed to load optional library Google IMA SDK - no ad will be shown
  • 10003: getAdBlock requested but ads setting is false and this is not a AWS Media Tailor stream
  • 10004: VAST parser does not exist yet - exit
  • 10005: Ad API call cannot be executed - ads setting is set to false
  • 10012: cannot use loadAds with Google IMA DAI stream
  • 10013: cannot use loadAds while Google Cast is engaged
  • 10014: Google Ima Display Container is not initialized - cannot use loadAds
  • 10015: rmp-vast is not initialized - cannot use loadAds
  • 10016: loadAds failed at loading and playing ad - query adErrorMessage, adVastErrorCode, adErrorType, adErrorCode getters for more information
  • 10017: stopAds called but no ad is on stage
  • 10018: skipAd called but no ad is on stage
  • 10019: Ad is not in a skippable state
  • ---
  • 12000: setSrc currently running - wait for srcchanged event
  • 12001: no playback support -> cannot use setSrc - exit
  • 12002: setSrc called but player is not ready - exit
  • 12003: cannot use setSrc for FairPlay streaming, outstream ads - exit
  • 12004: failed at changing player source
  • ---
  • 13000: Google tag is not installed on this page, cannot send data to Google Analytics
  • ---
  • 14000: floating feature requires an anchor element, disabling floating
  • ---
  • 15000: failed at loading chapters WEBVTT file
  • 15001: not a valid WEBVTT file for chapters - exit
  • ---
  • 16000: failed to load cast_sender.js dependency
  • 16001: castSession.loadMedia failed on receiving device
  • 16002: failed at selecting receiver device
  • 16003: failed at initializing Google Cast Cordova
  • 16004: cast media is loading - prevented play on local player
  • ---
  • 17000: error entering fullscreen mode
  • 17001: error exiting fullscreen mode
  • 17002: already in fullscreen mode
  • 17003: already in window mode (out of fullscreen mode)

Player code example for error management API

<script src="https://cdn.radiantmediatechs.com/rmp/10.1.4/js/rmp.min.js"></script>
<div id="rmp"></div>
<script>

  const src = {
    hls: 'https://your-hls-url.m3u8'
  };
  const settings = {
    licenseKey: 'your-license-key',
    src,
    width: 640,
    height: 360,
    contentMetadata: {
      poster: [
        'https://your-poster-url.jpg'
      ]
    }
  };

  const elementID = 'rmp';
  const rmp = new RadiantMP(elementID);

  // Listening for error events
  rmp.on('error', () => {
    console.log('fatal error detected');
    console.log(rmp.errorData);
  });

  // Listening for warning events
  rmp.on('warning', () => {
    console.log('non-fatal error detected');
    console.log(rmp.warningData);
  });

  // Player initialisation
  async function initRmpPlayer() {
    try {
      await rmp.init(settings);
    } catch (error) {
      console.error('Radiant Media Player failed to initialize', error);
    }
  }
  initRmpPlayer();

</script>

Advanced error management with hls.js and Shaka player

hls.js and Shaka player offer advanced error data that are also exposed by the player.

hls.js

The list of errors provided by hls.js in its API can be found here. Here is an example of how to extract those errors information in Radiant Media Player:

rmp.on('error', () => {
  const errorData = rmp.errorData;
  if (errorData.code === 201) {
    const data = errorData.event;
    if (data) {
      console.log(data.type);
      console.log(data.fatal);
      console.log(data.details);
      // Other properties from the data Object may be available - see hls.js docs
    }
  }
});

In the same way we can listen for hls.js warning

rmp.on('warning', () => {
  const warningData = rmp.warningData;
  if (warningData.code === 2000) { 
    const data = warningData.event;
    if (data) {
      console.log(data.type);
      console.log(data.fatal);
      console.log(data.details);
      // Other properties from the data Object may be available - see hls.js docs
    }
  }
});

Shaka player

The list of errors provided by Shaka player in its API can be found here. Here is an example of how to extract those errors information in Radiant Media Player:

rmp.on('error', () => {
  const errorData = rmp.errorData;
  if (errorData.code === 301) {
    const data = errorData.event;
    if (data) {
      console.log(data.category);
      console.log(data.code);
      console.log(data.message);
      // Other properties from the data Object may be available - see Shaka player docs
    }
  }
});

In the same way we can listen for hls.js warning

rmp.on('warning', () => {
  const warningData = rmp.warningData;
  if (warningData.code === 3000) {
    const data = warningData.event;
    if (data) {
      console.log(data.category);
      console.log(data.code);
      console.log(data.message);
    }
  }
});

Video ads error management

Due to the unique nature of video ads error handling, ad error management is dealt with for each VAST parser offered by the player:

Offline API error management

See the offline API docs here.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.

©2015-2025 Radiant Media Player. All Rights Reserved.