Hi guys,

I'm trying to play/pause two different video with Froogaloop.

I gave them different IDs so that they do not play/pause altogether. Unfortunately I must be doing something wrong because the control buttons operate only on one of the two videos.

I attached my code here (jsfiddle.net/cfocjet/45Zc3/1/), do you know what I'm doing wrong?

Many thanks.

Link: jsfiddle.net/cfocjet/45Zc3/1/

Brad Dougherty

Brad Dougherty Staff

Hi Clément,

It's because you're reassigning the player variable. It would control the second player, but you have $('#player2')[1] instead of $('#player2')[0]. It would be more efficient to add the events on both players up front, then use the id that is passed to each callback (onPause, onFinish, etc) to determine what to do.



Thanks Brad,

I figured it out.

Take care.

This conversation is missing your voice. Please join Vimeo or log in.