Diseño acorde con los videos de youtube que se inician y se detienen

Ok so to start, I have a php webpage that pulls info from my mysql database and populates a page of videos. These videos are displayed in a vertical accordian initally you see the thumbnail and when clicking the thumbnail it expands (accordian effect) and shows the video and plays the video and then when clicking on a new tab the previous video stops playing.

I know this can be done and I almost got it working using the google apis but it didnt work 100%

Here is the jsFiddle to see what I am talking about, I am pretty sure if I can figure out how to make this work I can then figure out how to make it work with my php, but where i got stuck last time is where if open section 1 i want the video only in section 1 to play and when i open another section i want the previously oppened tab to stop playing and play the new one.

HOpefully this makes sense


preguntado el 01 de febrero de 12 a las 01:02

1 Respuestas

There was no solution for youtube as the API was not involved enough, or I could not figure it out, but rather to embed with flash when falsh was available and because of how videos operate on mobile devices I wouldnt have to worry about html5 playing when it was not on screen because if the video is not seen it will not play.

Vimeo did however offer a javascript api function to stop playing the video when the next page was clicked.

Respondido el 08 de junio de 12 a las 23:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.