From: rwldrn Date: Sat, 4 Dec 2010 16:32:05 +0000 (-0500) Subject: Minor draft revisions X-Git-Tag: v0.2~75 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6f043edcbc5616ff090a38a028bfd526ce188534;p=popcorn-js.git Minor draft revisions --- diff --git a/popcorn-api-draft.js b/popcorn-api-draft.js index 1c506c0..fd1ea20 100644 --- a/popcorn-api-draft.js +++ b/popcorn-api-draft.js @@ -6,7 +6,6 @@ // reference to the window context (function(global) { - // Cache refs to speed up calls to native utils var forEach = Array.prototype.forEach, @@ -138,6 +137,27 @@ })() ); + Popcorn.extend(Popcorn.p, { + + setCommand: function() { + + }, + getCommand: function() { + + }, + toTrack: function( setup ) { + /* + { + in: ts, + out: ts, + command: f() + } + */ + // stores the command in a track + } + + }); + var nativeEvents = "loadstart progress suspend emptied stalled play pause " + "loadedmetadata loadeddata waiting playing canplay canplaythrough " + "seeking seeked timeupdate ended ratechange durationchange volumechange"; @@ -194,8 +214,13 @@ }, false); } - return this; + }, + special: { + // handles timeline controllers + play: function () { + // renders all of the interally stored track commands + } } } }; @@ -220,7 +245,6 @@ Popcorn.extend( Popcorn.p, plugin ); - if ( Popcorn.registry ) { Popcorn.registry.push({ name: name, @@ -228,10 +252,11 @@ }); } - // within the context of a plugin, the `timeupdate` or any of the events can be listened to + // within the context of a plugin + // any of the events can be listened to }; global.Popcorn = Popcorn; -})(window); \ No newline at end of file +})(window); diff --git a/test/demo.html b/test/demo.html index c96fe02..156d7f6 100644 --- a/test/demo.html +++ b/test/demo.html @@ -1,14 +1,14 @@ - Popcorn API DEMO + Popcorn API Draft DEMO -

Popcorn API

+

Popcorn API Draft