]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
merged scotss twitterwidget branch in, now containes footnote, 47, manifest, twitterW...
authorDaniel Hodgin <dhodgin@gmail.com>
Fri, 25 Jun 2010 19:43:48 +0000 (15:43 -0400)
committerDaniel Hodgin <dhodgin@gmail.com>
Fri, 25 Jun 2010 19:43:48 +0000 (15:43 -0400)
1  2 
index.html
popcorn.js
xml/webMadeMovies.xml

diff --cc index.html
index 82b718b206a02e168a3013dd24e31436403ee92c,1c519473c1ef6642ff8c71d489d64b4b74b988db..8e820e1cdcd8d6681aea95dc0cd9d0131e19a3b9
@@@ -1,10 -1,9 +1,11 @@@
  <html> 
    <head> 
-     <title>html5 video demo</title>   
+     <title>html5 video demo</title> 
+     <script src="http://widgets.twimg.com/j/2/widget.js"></script>
      <script src="popcorn.js"></script>
      <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
 +    <script src="http://google.com/jsapi"></script>
 +    <script>google.load("language","1");</script>
      <style type="text/css" media="screen"> 
        body { 
          background-color:#eee; 
    <body> 
      <div id="container">
        <video src="http://a52.video2.blip.tv/7320003802153/Etherworks-WebMadeMovies3BuildingABetterInternet799.ogg" data-timeline-sources="xml/webMadeMovies.xml" controls></video>
 +      <select id="language">
 +        <option val="en">English</option>
 +        <option val="es">Spanish</option>
 +        <option val="fr">French</option>
 +        <option val="de">German</option>
 +        <option val="ja">Japanese</option>
 +        <option val="zh">Chinese</option>
 +      </select>
        <div id="sub"></div><br />
 +      <div id="footnotediv"></div><br />
        <div id="tagthisvideo">In this video:<span id="inthisvideo"></span></div><br />
-       <div id="map"></div>
-     </div>
+       <div id="map"></div><br />
+       <div id="twitter"></div>
    </body> 
  </html> 
  
diff --cc popcorn.js
index abea47f1faf0acad2710f7137b5555a4409fffc1,26e4f376eb7740dcc4b8ed370e2a294f059aa1ed..e1ac986509671574c2bef777edd2ee42f44f4ba9
      };
    };
  
-   var TwitterCommand = function(name, params, text, videoManager) {}; // http://twitter.com/celinecelines
 +  ////////////////////////////////////////////////////////////////////////////
 +  // Twitter Command
 +  ////////////////////////////////////////////////////////////////////////////
 +
 -    this.in = function() {
+   var TwitterCommand = function(name, params, text) {
+     VideoCommand.call(this, name, params, text);
+     // Setup a default, hidden div to hold the feed
+     this.target = document.createElement('div');
+     this.target.setAttribute('id', this.id);
+     document.getElementById(this.params.target).appendChild(this.target);
+     // Div is hidden by default
+     this.target.setAttribute('style', 'display:none');
+     new TWTR.Widget({
+       creator: true,
+       version: 2,
+       type: 'search',
+       id: this.target.getAttribute('id'),
+       search: this.params.source,
+       rpp: 30,
+       width: 250,
+       height: 200,
+       interval: 6000,
+       theme: {
+         shell: {
+           background: '#8ec1da',
+           color: '#ffffff'
+         },
+         tweets: {
+           background: '#ffffff',
+           color: '#444444',
+           links: '#1985b5'
+         }
+       },
+       features: {
+         loop: true,
+         timestamp: true,
+         avatars: true,
+         hashtags: true,
+         toptweets: true,
+         live: true,
+         scrollbar: false,
+         behavior: 'default'
+       }
+     }).render().start();
+ 
 -    this.out = function() {
++    this.onIn = function() {
+       this.target.setAttribute('style', 'display:inline');
+     };
++    this.onOut = function() {
+       this.target.setAttribute('style', 'display:none');
+     };
+     this.preload = function() {}; // Probably going to need to preload this.
+   }; // http://twitter.com/celinecelines
  
 +  ////////////////////////////////////////////////////////////////////////////
 +  // Footnote Command
 +  ////////////////////////////////////////////////////////////////////////////
 +
 +      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() {
 +                      if( this.params.target ) {
 +                              document.getElementById( this.params.target ).innerHTML  = "";
 +                      } else {
 +                              //this will be done later in ticket #46 (support default div)
 +                      }
 +    };
 +  };
 +
    // Wrapper for accessing commands by name
    // commands[name].create() returns a new command of type name
    // Not sure if this is the best way; maybe it's too fancy?
        }
      },
      location: {
 -      create: function(name, params, text) {
 -        return new MapCommand(name, params, text);
 +      create: function(name, params, text, videoManager) {
 +        return new MapCommand(name, params, text, videoManager);
 +      }
 +    },
 +      footnote: {
 +              create: function(name, params, text) {
 +        return new FootnoteCommand(name, params, text);
        }
+     },
+     twitter: {
+       create: function(name, params, text) {
+         return new TwitterCommand(name, params, text);
+       }
      }
    };
  
index 0b5bedefeec923ab5f896d90d01e899539938721,ee5d5e22299dfa922e626d1d120c5adce9eea05f..a4ab4aa2f9db73d32777314b950996350d6deafc
  <popcorn>
-       <twitter in="00:00:05:00" out="00:00:13:00" target="map" resourceid="celinetwitter" numberoftweets="5"/>
 +  <manifest>
 +    <people>
 +      <person id="celine" name="Celine" salutation="Miss." >
 +        <resource id="celinehomepage" src="http://www.celinecelines.com/" description="Celine's Homepage" />
 +        <resource id="celinetwitter" src="http://twitter.com/celinecelines" description="Celine's Twitter" />
 +      </person>
 +      <person id="brian" name="brian" >
 +        <resource id="briantwitter" src="http://twitter.com/bchirls" description="Brian's twitter" />
 +      </person>
 +      <person id="mona" name="Mona" >
 +        <resource id="monahomepage" src="http://monakasra.com/" description="Mona's Homepage"/>
 +      </person>
 +      <person id="dave" name="Dave" >
 +        <resource id="davetwitter" src="http://twitter.com/academicdave" description="Dave's twitter" />
 +      </person>
 +      <person id="noah" name="Noah" >
 +        <resource id="noahtwitter" src="http://twitter.com/noahworkman" description="Noah's Twitter Feed" />
 +      </person>
 +    </people>
 +    <places>
 +      <place id="acc" type="building" name="Austin Convention Center">
 +        <resource id="acchomepage" src="http://www.austinconventioncenter.com/" description="Austin Convention Center"/>
 +      </place>
 +      <place id="saopaulo" type="city" name="Sao Paulo">
 +        <resource id="saupaulowiki" src="http://en.wikipedia.org/wiki/S%C3%A3o_Paulo" description="Sao Paulo city, Brazil"/>
 +      </place>
 +    </places>
 +    <attributions>
 +      <attribution id="attrib" nameofwork="A Shared Culture" copyrightholder="Jesse Dylan"
 +                   license="CC-BY-NC"  licenseurl="http://creativecommons.org/licenses/by-nc/2.0/"/>
 +    </attributions>
 +  </manifest>
 +  <timeline>
 +    <subtitles>
 +      <subtitle >Hello! My name is Celine Celine</subtitle>
 +      <subtitle in="00:00:07:00" out="00:00:09:00">And I help the Internet be easier</subtitle>
 +      <subtitle in="00:00:09:00" out="00:00:12:00">by making things easier</subtitle>
 +      <subtitle in="00:00:15:00" out="00:00:17:00">My name is Mona Kasra</subtitle>
 +      <subtitle in="00:00:17:00" out="00:00:19:00">and I'm building a better internet</subtitle>
 +      <subtitle in="00:00:32:00" out="00:00:34:00">I make the Internet better</subtitle>
 +      <subtitle in="00:00:34:00" out="00:00:36:00">producing and sharing music</subtitle>
 +      <subtitle in="00:36:00" out="00:38:00">using creative commons</subtitle>
 +      <subtitle in="00:00:42:00" out="00:00:44:00">I make the Internet better</subtitle>
 +      <subtitle in="00:00:44:00" out="00:00:46:00">because I fight for open educational resources</subtitle>
 +      <subtitle in="00:00:46:00" out="00:00:47:00">on the web</subtitle>
 +      <subtitle in="00:00:51:00" out="00:00:53:00">I make the Internet better</subtitle>
 +      <subtitle in="00:00:53:00" out="00:00:54.5:00">by hacking things</subtitle>
 +      <subtitle in="00:00:54.5:00" out="00:00:56:00">without using a single line of code</subtitle>
 +      <subtitle in="00:00:56:00" out="00:00:57:00">I make the Internet better</subtitle>
 +      <subtitle in="00:00:57:00" out="00:01:00:00">by changing the world of journalism</subtitle>
 +      <subtitle in="00:01:01:00" out="00:01:02:15">you can mobilize people</subtitle>
 +      <subtitle in="00:01:02:15" out="00:01:05:00">you don't need to have money anymore</subtitle>
 +      <subtitle in="00:01:05:00" out="00:01:08:00">or big structures</subtitle>
 +      <subtitle in="00:01:08:00" out="00:01:09:00">you can do everything at home with the Internet</subtitle>
 +    </subtitles>
 +    <footnotes>
 +      <footnote in="00:00:00" out="00:14:00" target="footnotediv"> This video made exclusively for drumbeat.org </footnote>
 +    </footnotes>
 +    <resources>
++      <twitter in="00:00:10:00" out="00:00:30:00" source="#oilspill" target="twitter"/>
++      <twitter in="00:00:01:00" out="00:00:20:00" source="from:celinecelines" target="twitter"/>
 +      <attribution in="00:00:36:00" out="00:40:00" target="map" resourceid="attrib" />
 +      <attribution in="00:40:00" out="00:00:42:00" target="map">A Shared Culture, Jesse Dylan</attribution>
 +    </resources>
 +    <videotags>
 +      <videotag in="00:00:03:00" out="00:00:14:00">Celine Celine</videotag>
 +      <videotag in="00:00:13:00" out="00:00:16:00">Brian</videotag>
 +      <videotag in="00:00:15:00" out="00:00:19:00">Mona Kasra</videotag>
 +      <videotag in="00:00:19:00" out="00:00:21:00">Caleb</videotag>
 +      <videotag in="00:00:21:00" out="00:00:31:00">Dave</videotag>
 +      <videotag in="00:00:21:00" out="00:00:33:00">Noah</videotag>
 +      <videotag in="00:00:39:00" out="00:00:41:00">Celine Celine</videotag>
 +    </videotags>
 +    <map>
 +      <location id="mapacc" resourceid="acchomepage" in="00:00:11:00" out="00:00:32:00" lat="30.1580" long="-97.7388" target="map" zoom="8"/>
 +      <location id="mapsaopaulo" resourceid="saopaulo" in="00:00:32:00" out="00:01:00:00" lat="-23.55" long="-46.6388" target="map" zoom="6"/>
 +    </map>
 +  </timeline>
++=======
+   <subtitles>
+     <subtitle in="0:05" out="0:07">Hello! My name is Celine Celine</subtitle>
+     <subtitle in="0:07" out="0:09">And I help the Internet be easier</subtitle>
+     <subtitle in="0:09" out="0:12">by making things easier</subtitle>
+     <subtitle in="0:15" out="0:17">My name is Mona Kasra</subtitle>
+     <subtitle in="0:17" out="0:19">and I'm building a better internet</subtitle>
+   </subtitles>
+   <inThisVideo>
+     <tagThisVideo in="0:03" out="0:14">Celine Celine</tagThisVideo>
+         <tagThisVideo in="0:13" out="0:16">Bryan</tagThisVideo>
+     <tagThisVideo in="0:15" out="0:19">Mona Kasra</tagThisVideo>
+         <tagThisVideo in="0:19" out="0:21">Caleb</tagThisVideo>
+         <tagThisVideo in="0:21" out="0:31">Dave</tagThisVideo>
+         <tagThisVideo in="0:21" out="0:33">Noah</tagThisVideo>
+         <tagThisVideo in="0:39" out="0:41">Celine Celine</tagThisVideo>
+   </inThisVideo>
+   <map>
+     <location id="map1" in="0:01" out="0:30" lat="45.505" long="-73.335" target="map" zoom="8"/>
+     <location id="map2" in="0:30" out="1:00" lat="43.771" long="-79.5" target="map" zoom="16"/>
+     <location id="map3" in="1:00" out="1:30" lat="41.771" long="-76.5" target="map" zoom="16"/>
+   </map>
+   <twitter in="0:10" out="0:30" source="#oilspill" target="twitter"/>
+   <twitter in="0:01" out="0:20" source="from:celinecelines" target="twitter"/>
++>>>>>>> cf9274e39096105186a3a362195e3cea6ea7af49
  </popcorn>