Skip to main content
Skip table of contents

Error reporting

If required, errors can be reported from the SDK player engine to a listener function in your Application layer. The function signature needs to be as follows:

JS
function onErrorCallback(
	errorSeverity,
	errorCategory,
	errorCode,
	errorMessage
) {
	// functionality to be implemented by the integrator
}

The listener function name should be passed to the SDK via a call through otvtoolkit to addErrorListener() on the exposed errorReporting component as follows:

JS
window.player.otvtoolkit().errorReporting.addErrorListener({
	errorChanged: onErrorCallback
});

When it is no longer required to be notified of errors, the removeErrorListener() API can be called as follows:

JS
window.player.otvtoolkit().errorReporting.removeErrorListener({
	errorChanged: onErrorCallback
});

The original setErrorListener API had a single usability limitation and is hence at notice of deprecation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.