<html><head><script src="popcorn-complete.js"></script></head><body><videoid="video"data-timeline-sources="data/data.json"controlswidth='250px'poster="../../test/poster.png"><sourceid='mp4'src="../../test/trailer.mp4"type='video/mp4; codecs="avc1, mp4a"'><sourceid='ogv'src="../../test/trailer.ogv"type='video/ogg; codecs="theora, vorbis"'><p>Your user agent does not support the HTML5 Video element.</p></video><divid="footnote-container"></div><divid="map-container"></div><divid="iframe-container"></div></body></html>
sequence( containerId, sourcesArray )
Purpose
Create a sequence of video clips that play back seamlessly.
Options
containerId [String] - The id of the HTML element to place videos in
sourcesArray [Array] - An array of objects, which contain the following:
src [String] - Path to your media file
in [String
Number] - Start time for this media file
out [String
Number] - End time for this media file
Instance Methods
eq( index ) - Return a Popcorn object for the given object from the sourcesArray
index [Number] - The position in the sourcesArray to get the object from
play() - Plays the sequence
exec( time, callback ) - Executes a function at a given time in the sequence
time [Number] - The time in the sequence in which callback will execute
callback [Function] - The function that we will execute
listen( eventName, callback ) - Listen for an event and fire a callback when that event is triggered
eventName [String] - The name of the event to listen for i.e. play, pause, timeupdate, canplayall, etc
callback [Function] - The function to run when the event has been fired
varsequence=Popcorn.sequence(...);varp=sequence.eq(0);sequence.listen("play",function(){alert("The sequence has started playing");});sequence.exec(8,function(){alert("8 seconds into the sequence");});sequence.play();