I am using the old Vimeo API froogaloop for a project. I realise this is now out of date but this is a legacy project and does not support the new version.
I am trying to determine if a video is paused or not by doing this..
$lg.on('onAfterSlide.lg', function(event, prevIndex, index){
iframe = $('.inner .item').eq(index).find('.vimeo').get(0);
var player = $f(iframe);
player.addEvent('ready', function() {
player.addEvent('paused', function(paused) {
if (paused) {
console.log('Video is paused');
}
else {
console.log('Video is not paused');
}
});
});
});
For some reason the paused function never runs, can anyone see any obvious mistakes I am making?
Looks like you are listening to the wrong event. Update
pausedtopause.player.addEvent('pause',...That should ensure you are listening to the correct event.
Out of curiosity, what in your out of date project blocks you from updating to the latest Video Player API from Froogaloop?