2

Hi I made a similar question (not the same) about how to stop the JWplayer when other button is clicked. its working great, using

onclick='jwplayer().stop()'

Stop JWPlayer when hidden the div with the player

Anyway this solution is not working when the JWplayer is loaded in an iframe..

I suppos this need some extra java, again I have no idea. i search and found this.. http://www.dyn-web.com/tutorials/iframes/refs/

But i have no idea on how to use it.

This is the code im using (sorry about the id, but im must be sure they are not in conflict anyway)

$("#prevvv").click(function() {
  $("#mvideoo").contents().find("#mvideoo").jwplayer().stop();
});

$("#nexttt").click(function() {
   $("#mvideoo").contents().find("#mvideoo").jwplayer().stop();
});

This is not working any ideas?

Community
  • 1
  • 1
  • 1
    http://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe/1639342#1639342 – emaxsaun Apr 09 '13 at 19:51
  • as i said i have no idea.. i have tried. $("#prevvv").click(function() { $("#mvideoo").contents().find("mvideoo").jwplayer().stop(); }); but sais jwplayer has no method, Im sorry im not lacy im newbie at javascript – DreaminMedia Queretaro Apr 09 '13 at 20:24
  • 1
    Where did you try this? – emaxsaun Apr 09 '13 at 21:20
  • If you go here http://quinocrafters.es/solutions.html, and then clic 2 Animacion 2D & 3d" you will load a gallery of videos into the right side, each video is using an iframe, (i try with out iframe, it wont work) so i cant manage to do it... – DreaminMedia Queretaro Apr 30 '13 at 14:15
  • 1
    I am a little confused because I don't see the player here ? Why does the player not work without an iframe? All of our demos don't use the and it works fine. Maybe this example will help ? http://www.longtailvideo.com/support/jw-player/29413/mutually-exclusive-playback – emaxsaun Apr 30 '13 at 15:28
  • I really dont know the technical reasons, of why it wasnt working, i will test later, with a clone of the files. so you can see the error when i try to insert the video direct as i do with everything, but i remember it was an error when trying to play de videos. – DreaminMedia Queretaro Apr 30 '13 at 15:56
  • okay, once you do please let me know, thanks. – emaxsaun Apr 30 '13 at 16:01
  • Here you go . http://quinocrafters.es/solutions22.html.. actually , i can see the video now!!! XD i dont know what happend, but there is a CSS?? mistake i think.. but this is a new error. Last time i wasent able to play the video. – DreaminMedia Queretaro Apr 30 '13 at 16:04
  • I cant use Google Chrome Inspect Element to view wich part of CSS is wrong.. so i cant fix it, =( – DreaminMedia Queretaro Apr 30 '13 at 16:25
  • 1
    ugh, I don't know. I would try a blank page and then add css back to figure out which css is causing it. – emaxsaun Apr 30 '13 at 16:27
  • good idea , thanks for everything. – DreaminMedia Queretaro Apr 30 '13 at 16:32
  • Anyway, it would be interesting, to know how to stop it if the video is inside the iframe, just for learn something new XD.. and for the future maybe.. As for this one i know is better to do it with out the iframe. thanks – DreaminMedia Queretaro Apr 30 '13 at 16:34
  • Np. Regarding the stop inside of iFrame thing, I have never done it before, sorry. – emaxsaun Apr 30 '13 at 19:15

0 Answers0