Difference between revisions of "VideoSequencer"

From CDOT Wiki
Jump to: navigation, search
Line 1: Line 1:
== VideoSequencer.js ==
 
 
 
== Description ==
 
 
The purpose of this project is to provide a new programming interface and API for popcorn.js.<br />
 
It will provide pause, play, and seek functionality for multiple videos that play one after the other.
 
 
== Project Leader(s) ==
 
 
Joel Young <br />
 
Annie Sobiepanek <br />
 
Scott Downe <br />
 
[[User:cadecairos|Christopher DeCairos]]
 
 
== Project Contributor(s) ==
 
 
 
 
 
== Project Details ==
 
== Project Details ==
  
Line 27: Line 8:
 
VideoSequencer currently contains these methods:<br /><br />
 
VideoSequencer currently contains these methods:<br /><br />
  
VideoManager() <br />
+
VideoSequencer() - Constructor <br />
play()<br />
+
play() - Plays the currently active video<br />
pause()<br />
+
pause() - Pauses the currently active video<br />
add()<br />
+
togglePlay() - if the active video is playing, it is paused. and vice-versa<br />
seek()<br />
+
add(src, len, index) - adds the URI in src of length len (in seconds) to the list of segments<br />
swap()<br />
+
seek(time) - calculates which segment is playing at the specified time, and swaps to it, then seeks to the right position (NEEDS WORK) <br />
swapTo()<br />
+
swap(seeking) - removes the active video tag from the DOM and displays the inactive video. It then creates a hidden tag and begins pre-loading it. if seeking is set to true, it will remove both tags. <br />
 
+
addEventListener(event, callback, useCapture) - adds the event and callback to the queue if it does not exist already, and then adds it to the currently playing video.<br />
== Project News ==
+
removeEventListener(event, callback, usecapture) - if event and callback exist in the event queue, they are remove from the queue and also from the currently playing video.<br />
 
+
addListenersToCurrentVideo(listener) - adds all callbacks in the queue for "listener" to the currently playing video<br />
Friday, October 22, 2010: VideoSequencer.js 0.1 Release!
+
createVideoTag(width, height, controls, hidden) - creates a new video tag with the specified settings and returns it.<br />
 +
update() - checks to see if the active video is about to end. If the video is about to end it calls swap().<br />
 +
convertXML(xmlDoc) - parses the video segment data into the VideoSequencer.<br />
 +
getSegmentData(segDataFile) - creates an XMLHttpRequest to get the segment data XML, then callse convertXML(xmlDoc)<br />
 +
calculateDuration() - calculates the duration of all the videos in the segment object and returns the value.

Revision as of 00:29, 7 December 2010

Project Details

It has been decided that VideoSequencer will be an external library for popcorn.js. There is a lighthouse ticket here. The Github repository for VideoSequencer can be found here.

duration is the total length in seconds of all the videos.
segments[] is an array of the video elements in the Sequencer

VideoSequencer currently contains these methods:

VideoSequencer() - Constructor
play() - Plays the currently active video
pause() - Pauses the currently active video
togglePlay() - if the active video is playing, it is paused. and vice-versa
add(src, len, index) - adds the URI in src of length len (in seconds) to the list of segments
seek(time) - calculates which segment is playing at the specified time, and swaps to it, then seeks to the right position (NEEDS WORK)
swap(seeking) - removes the active video tag from the DOM and displays the inactive video. It then creates a hidden tag and begins pre-loading it. if seeking is set to true, it will remove both tags.
addEventListener(event, callback, useCapture) - adds the event and callback to the queue if it does not exist already, and then adds it to the currently playing video.
removeEventListener(event, callback, usecapture) - if event and callback exist in the event queue, they are remove from the queue and also from the currently playing video.
addListenersToCurrentVideo(listener) - adds all callbacks in the queue for "listener" to the currently playing video
createVideoTag(width, height, controls, hidden) - creates a new video tag with the specified settings and returns it.
update() - checks to see if the active video is about to end. If the video is about to end it calls swap().
convertXML(xmlDoc) - parses the video segment data into the VideoSequencer.
getSegmentData(segDataFile) - creates an XMLHttpRequest to get the segment data XML, then callse convertXML(xmlDoc)
calculateDuration() - calculates the duration of all the videos in the segment object and returns the value.