
Only play sections of a video
How do I make a video hosted on the JW Platform play from (say) 15secs to 45secs? Is this even possible?
How do I make a video hosted on the JW Platform play from (say) 15secs to 45secs? Is this even possible?
You would use the API.
Basically onBeforePlay(), have the player seek() 15 seconds.
And then you can use onTime() and say when the time is 45 seconds, to stop()
http://www.longtailvideo.com/support/jw-player/28851/javascript-api-reference
I'm not a programmer. Can you give me an actual code snippet that would work with this embed code:
<script type="text/javascript" src="http://content.bitsontherun.com/players/xxxxxxxx-xxxxxxxx.js"></script>
Thanks
Put this under that line of code:
<script type='text/javascript'> jwplayer().onBeforePlay(function() { jwplayer().seek(15); }); jwplayer().onTime(function(event) { if (event.position >= 45) {jwplayer().stop();} }); </script>Thanks very much, Ethan!
Np!