
Preloading (aka prebuffering) downloaded videos & youtube videos
I am developing an application, where timing is very critical . . . (briefly, its a web-based synced instructional mixed media player). The html for the application will have multiple videos, each in their own hidden div, each with their own jw player. When a video's turn in the presentation comes up, its div will be unhidden and I will start playing it via the javscript API. Some videos will be hosted by me on AWS CloudFront (download mode) and others will come from YouTube (with other sources to be added).
Ideally, all the content (or at least the first video or two) will be fully buffered before I start the presentation, even if this takes a few minutes. This is becaues buffering mid-play will cause my timing to get off. (trust me, it matters in this case).
Its not clear from the documentation how pre-loading (aka prebuffering) works with JWPlayer--whether I need to invoke something to cause each player to fully buffer before playing or if this happens automatically. So I'm looking for some tips here.
Do I need to invoke something via javascript for the players on my page to have them buffer the videos (without actually starting playback)?
What about the YouTube videos? Is there any way to get those to prebuffer so I can start playback instantly?
I'm assuming that to detect when a buffer is full, i'll just use onBufferChange(callback) and check for the bufferPercent attribute getting to 100.
BTW, JW PLayer is awesome! Started down the path of FlowPlayer but then checked out JW Player and noticed the support for youtube and HTML5 and was sold.
Thanks,
Ben