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)
getErrorData()
rmp.getErrorData();
Returns Object
representing the (error|warning) that was just emitted by the
player.
When available this object will have the following properties offering more details on the
(error|warning):
{ code: Number, // the (error|warning) number message: String, // the (error|warning) message event: (Object|null), // the native (error|warning) DOM or library-specific event if available fatal: Boolean // if the error fatal (error) or not (warning) }
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.
For values obtained through the getErrorData
API method:
error
100
: error on HTML5 media element101
: error loading or parsing input playlist102
: error loading or parsing input related104
: could not launch player - destroy has been requested in the meantime
due to invalid license105
: id parameter for new RadiantMP is not a string or is an empty string
- exit106
: could not find player container with id on page - exit107
: no playback support200
: failed to load required lib hls.js201
: hls.js fatal error - cannot recover202
: IMA DAI backup stream not provided - cannot recover203
: hls.js fatal error - manifest parsing error204
: hls.js fatal error - network error205
: hls.js fatal error - incompatible codecs error206
: hls.js fatal error - decoding media error300
: failed to load required lib Shaka player301
: Shaka player error - cannot recover302
: shaka.Player.isBrowserSupported returned false - cannot use Shaka
player in this environment303
: Shaka player fatal error - error from the network stack304
: Shaka player fatal error - error from parsing text streams305
: Shaka player fatal error - error parsing or processing audio or
video streams306
: Shaka player fatal error - error parsing the manifest307
: Shaka player fatal error - error related to streaming308
: Shaka player fatal error - errors related to DRM309
: Shaka player fatal error - error in the database storage (offline)
500
: failed to load required lib three.js (360° video)600
: FPS failed to retrieve the FPS server certificate601
: FPS key System not supported602
: FPS could not create MediaKeys603
: FPS could not create key session604
: FPS license request failedwarning
1000
: failed to load logo at provided URI1001
: failed to load poster at provided URI1002
: failed to load animated poster at provided URI1003
: fullscreenerror1004
: destroy currently running - wait for destroycompleted event 1005
: setSrc currently running - wait for srcchanged event1006
: cannot append playlist layout - missing rmp-playlist-container
container1009
: failed to enter picture to picture mode1012
: not ready - cannot initiate playback - exit1013
: player ready but hls.js is not instantiated yet - cannot initiate playback - exit1014
: warning on HTML5 media element2000
: hls.js warning3000
: Shaka player warning3001
: storage has not been initialized -shakaOffline
setting
is set to false or stream is not on-demand3002
: could not download offline content3003
: could not list offline downloaded content3004
: could not remove offline downloaded content3005
: could not load offline content - invalid input3006
: could not query temporary storage usage and availability3007
: offline storage is not supported in this environment3008
: could not abort download of offline content4000
: failed to load vtt.js4001
: vtt.js parsing error4002
: failed to load text track at provided URI6000
: FPS decryption key error was encountered6001
: FPS video playback error occured7000
: failed to load cast_sender.js dependency7001
: castSession.loadMedia failed on receiving device7002
: failed at selecting receiver device7003
: failed at initializing Google Cast Cordova8000
: failed to load VTT thumbnail file at URI8001
: failed to load sprite image at URI8002
: not a valid VTT file - no further action taken8003
: could not parse thumbnails VTT file - corrupted data found9000
: error parsing JSON for custom icons9001
: error loading JSON for custom icons9002
: not a valid VTT transcripts file - no further action taken9003
: could not parse transcripts VTT file - corrupted data found9004
: cannot append transcripts layout - missing rmp-transcripts-container container9005
: failed to load VTT transcripts file10000
: failed to load optional library rmp-vast - no ad will be shown10001
: failed to load optional library Google IMA SDK - no ad will be shown12000
: setAudioTrack API input parameter is not a number - exit12001
: setAudioTrack API input parameter is out of bound - exit13000
: Google tag is not installed on this page -> cannot send data to Google
Analytics14000
: Floating feature requires an anchor element, this element appears to be missing -> disabling feature15000
: Failed at loading chapters WEBVTT file15001
: Not a valid WEBVTT file for chapters - exit<script src="https://cdn.radiantmediatechs.com/rmp/9.16.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: src, width: 640, height: 360, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] } }; const elementID = 'rmp'; const rmp = new RadiantMP(elementID); // Listening for (error|warning) events rmp.on('error', () => { console.log('fatal error detected'); console.log(rmp.getErrorData()); }); rmp.on('warning', () => { console.log('non-fatal error detected'); console.log(rmp.getErrorData()); }); // Player initialisation only after API events are registered rmp.init(settings); </script>
hls.js and Shaka player offer advanced error data that are also exposed by the player unified error management design.
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.getErrorData(); 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 errorData = rmp.getErrorData(); if (errorData.code === 2000) { 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 } } });
The list of errors provided by Shaka player in its API can be found here. This notably includes error management for DRM (Widevine, PlayReady, ClearKey - FairPlay streaming errors are directly available at player level). Here is an example of how to extract those errors information in Radiant Media Player:
rmp.on('error', () => { const errorData = rmp.getErrorData(); 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 errorData = rmp.getErrorData(); if (errorData.code === 3000) { const data = errorData.event; if (data) { console.log(data.category); console.log(data.code); console.log(data.message); } } });
Due to the unique nature of video ads error handling, ad error management is dealt with for each VAST parser offered by the player:
©2015-2024 Radiant Media Player. All Rights Reserved.