Skip to main content

Tracking Errors

Video can throw error due to number of reasons. If the playback tokens (otp, playbackInfo) is out of time, the end-user will get a message saying "2013 time expired". Most such errors contains two parts, a code and an error message. The code can be either 4 digits or 8 digits. The exact error code tells us the root cause of the error, that is why we ask for that.

The video player has an error event that can help you track such errors for your

* @param {{status: object, error, object}} payload
* @param {hasError: boolean, errorMessage: string} payload.status
* @param {vdo: number, shaka: number, details: object} payload.error
function errorHandler(payload) {}

video.addEventListener('error', errorHandler);
statusobjectwhat to display
status.errorMessagestringmessage that can be displayed to user. We have tried to keep error messages to be actionable by the user and not technical
errorobjecterror object that can be used for analytics
error.vdonumber4 digit number returned by license server
error.shakanumber4 digit number generated by shaka player
error.detailsobjectobject with variable structure depending on the source