Closed robertwbradford closed 9 years ago
Sorry for the delay in replying. To get the video that called that specific event, use this
keyword.
$(".vimeo-player").on("playProgress", function(event, data){
console.log(this); //returns the DOM object that was affected. Use $(this) for jquery object
console.log('playProgress for video ID: '+videoId);
});
Well that's simple enough! Thanks.
I have multiple players on a page, and I am wanting to fire events on each of them independently. For example:
Now in my JS:
As you can see I want to apply this to all videos using the
.vimeo-player
class selector instead of an id selector. How can I get access to the 1977937 and 76979871 IDs (setting myvideoId
variable above) from within thisplayProgress
event handler?Thanks. Great plugin by the way.