Auto-Play video from HTML link, then load another video onComplete
Here is my test page: http://www.toddcassetty.com/index_test2.html
This is what I want to happen: 1. The player loads and auto plays the first video (featured_2_h264.mov) 2. Upon clicking the "WATCH OUR REEL" link, the player loads and plays the second video (videos/reel_tcws_2k_h264.mov) 3. At the end of the second video, player loads the first video, and displays thumbnail, but does not auto play.
Currently, The player loads and auto-plays the first video. Upon clicking the "WATCH OUR REEL" link, the player loads the second video, but doesn't auto-play.
After that, I have no idea how to call the onComplete function..
bc.. Also, was it not possible to add the onComplete function to the code I had before? It works perfectly now, just curious and trying to learn more about the best way to do things.
i did use the code that i copied from: *http://www.toddcassetty.com/index_test2.html* so now i'm puzzled...
Well, you added the onComplete function to the jwPlayer setup code, whereas I was trying to add it to the href link.
Also, you changed the href link code from this: bc.. <a href="#" onclick="player.sendEvent('LOAD', 'videos/reel_tcws_2k_h264.mov');player.sendEvent('PLAY', 'true');player.onComplete('LOAD', 'videos/featured_2_h264.mov', 'images/thumb_featured.jpg');return false;">WATCH OUR REEL</a>
Obviously, the way I was trying to implement the "player.onComplete" function wasn't working, but I'm curious about the other syntax and if the "sendEvent" is not a good way to go about it. I got that bit from another thread here, and it was suggested by a LongTail moderator..
I'm guessing, like with any other code, there are a million ways to do anything. Just wondering why one method may be better than the other. Ultimately, I'm just happy that it works, but I'm also trying to understand it better.
Thanks again for your time, I really do appreciate it!