From XiphWiki
Revision as of 18:59, 10 May 2007 by Shans (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

We want the OggPlay plugin to support both a simple individual movie mode, and a more fully-featured playlist mode. All of the functions supported in individual movie mode are still useful in playlist mode; however additional functions also become useful.

Individual movies


enum OggPlayState { PAUSED = 0; PLAYING = 1; FINISHED = 2 };

These are fairly self-evident: the plugin begins in PAUSED or PLAYING state depending on the settings provided through the params tags, and changes to FINISHED state when the movie finishes playback.


To retrieve the state:

int <- getCurrentState()



This function will convert the PLAYING or FINISHED states to PAUSED.



This function will convert the PAUSED state to PLAYING or FINISHED depending upon the current position within the movie.



This function will convert any state to PLAYING, and start the movie again from the beginning


To retrieve the currently playing (or just played, or about to play) movie:

string URL <- getCurrentMovie()


To set a new movie:

setCurrentMovie(string URL)

This will automatically begin playing at the beginning if the state is PLAYING or FINISHED, but will remain paused ready to play at the beginning if the state is PAUSED.