Testing and Debugging
Testing and debugging the application is just like testing within Chrome and using the developer tools.
Test Using the Desktop Application
The easiest way to develop your code is using our Desktop application as you can open the Chrome Javascript console (Command/Control J) and see what is going on as you preview a playlist and adjust the code for either the html overlay or html app.
You may use the log
command to log strings to the Player console. This log is generated as a debug level event. You view this within the TelemetryTV Player console. Alternatively you can set the Device's log level to Debug in order to see the log events within the TelemetryTV interface (though you shouldn't leave debug on for long periods as it'll overwhelm more critical log events, only keep in on during debugging).
import { bindEvent } from '@telemetrytv/sdk'
function onSdkReady () {
console.log('SDK is ready')
// -> Do something else
}
bindEvent('onReady', onSdkReady)
You can also access the browser console (just like Chrome's console) by pressing Command-J (Control-J on Windows) while running the Desktop or Player apps. This displays all JavaScript logs for the application and the logs you generate with the log command are mixed in with them.
Updated 4 months ago