It seems the new realese of today broke soemthing with cuepoints.
When I try executing on('cuepoint'):
I get this error
player.fr-FR.js:2 Uncaught TypeError: e.target.activeCues.concat is not a function
at TextTrack.<anonymous> (player.fr-FR.js:2)
at TextTrack.e (player.fr-FR.js:2)
On first play, I split the timeline in 20 parts and I save those in an array for further use.
vPlayer.on('play', function() {
if (!playonce){
playonce=true;
console.log('play');
this.getDuration().then(function(d) {
duration = d;
console.log('DURATION: '+d);
cuepoints = [];
for (i = 1; i <= 20; i++)
{
cuepoints.push({ val: Math.floor((d / 20)*i)-1, passed: false});
}
for (var i = 0, len = cuepoints.length; i < len; i++) {
vPlayer.addCuePoint(Math.floor(cuepoints[i].val), {
iteration: i
});
}
});
}else{
console.log('resume');
}
});
When the code must execute my "cuepoint" event, it throws the error.
Sorry about that, this should be resolved in the last release.