xapi with Embeded iframe
Hi,
It's any way to use xapi if I'm embebeding the h5p in moodle with an Iframe ?
I test it using the chrome console, but seems that is not working
Test code:
H5P.externalDispatcher.on('xAPI', function(event){
if (event.getScore() === event.getMaxScore() && event.getMaxScore() > 0){
console.log('do something useful here');
}
});
Error :
Uncaught ReferenceError: H5P is not defined at <anonymous>:1:1
Thanks,