From 6f043edcbc5616ff090a38a028bfd526ce188534 Mon Sep 17 00:00:00 2001 From: rwldrn Date: Sat, 4 Dec 2010 11:32:05 -0500 Subject: [PATCH] Minor draft revisions --- popcorn-api-draft.js | 35 ++++++++++++++++++++++++++++++----- test/demo.html | 10 ++-------- test/demo.js | 16 ++-------------- 3 files changed, 34 insertions(+), 27 deletions(-) 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