]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
added footnotes [#54 state:peer-review-requested]
authorAnna Sobiepanek <annaopensource@gmail.com>
Fri, 25 Jun 2010 17:05:45 +0000 (13:05 -0400)
committerAnna Sobiepanek <annaopensource@gmail.com>
Fri, 25 Jun 2010 17:05:45 +0000 (13:05 -0400)
index.html
popcorn.js
xml/webMadeMovies.xml

index 7c2167e70747c339742ea4a92908092d617a2a6d..74a8e9dc9aaa7a647f0eee7adb957185e202cd0d 100644 (file)
@@ -36,7 +36,8 @@
   <body> 
     <div id="container">
       <video src="http://a52.video2.blip.tv/7320003802153/Etherworks-WebMadeMovies3BuildingABetterInternet799.ogg" data-timeline-sources="xml/webMadeMovies.xml" controls></video>
-      <div id="sub"></div><br />
+      <div id="footnotediv"></div><br />
+                       <div id="sub"></div><br />
       <div id="tagthisvideo">In this video:<span id="inthisvideo"></span></div><br />
       <div id="map"></div>
     </div>
index 282b1c9f4e1c89fd7bebc5fb8265254043018b6b..aea30b5f06dcdbbe93ce3075f3f0036c750774fb 100644 (file)
       MapCommand.map.setZoom(0);
     };
   };
-
+       var FootnoteCommand = function(name, params, text) {
+    VideoCommand.call(this, name, params, text);
+    this.onIn = function() {
+                       //if the user specifies a target div for this in the xml use it
+                       //otherwise make a new div 
+                       if( this.params.target ) {
+                               document.getElementById( this.params.target ).innerHTML  = this.text;
+                       } else {
+                               //this will be done later in ticket #46 (support default div)
+                               //for this case i would think get the parent div of the <video> and append a new div to it
+                       }
+    };
+    this.onOut = function() {
+      document.getElementById("footnote").innerHTML  = "";
+    };
+  };
   var TwitterCommand = function(name, params, text) {}; // http://twitter.com/celinecelines
 
   // Wrapper for accessing commands by name
       create: function(name, params, text) {
         return new MapCommand(name, params, text);
       }
+    },
+       footnote: {
+               create: function(name, params, text) {
+        return new FootnoteCommand(name, params, text);
+      }
     }
   };
 
index 9135cc29870d1564e5948d6c4abb2b88207b2275..89c83a9fb95f0881a44b74e3961c469ab4e6a447 100644 (file)
@@ -6,6 +6,9 @@
     <subtitle in="00:15:00" out="00:17:00">My name is Mona Kasra</subtitle>
     <subtitle in="00:17:00" out="00:19:00">and I'm building a better internet</subtitle>
   </subtitles>
+       <footnotes>
+               <footnote in="00:00:00" out="00:14:00" target="footnotediv"> This video made exclusively for drumbeat.org </footnote>
+       </footnotes>
   <inThisVideo>
     <tagThisVideo in="00:03:00" out="00:14:00">Celine Celine</tagThisVideo>
     <tagThisVideo in="00:13:00" out="00:16:00">Bryan</tagThisVideo>