]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
initial work no tests [#294]
authorAnna Sobiepanek <annaopensource@gmail.com>
Wed, 26 Jan 2011 20:26:03 +0000 (15:26 -0500)
committerAnna Sobiepanek <annaopensource@gmail.com>
Wed, 26 Jan 2011 20:26:03 +0000 (15:26 -0500)
plugins/tagthisperson/popcorn.tagthisperson.html
plugins/tagthisperson/popcorn.tagthisperson.js
plugins/twitter/popcorn.twitter.html

index 239417617d3f8bc8d20aad5bdd0a4ca1c5f62133..94821a761287c44331c0af24b9c1a93b5465fcf7 100644 (file)
@@ -14,6 +14,7 @@
         start: 0, // seconds
         end: 10, // seconds
         person: 'Anna Sob',
+        image: 'http://newshour.s3.amazonaws.com/photos%2Fspeeches%2Fguests%2FRichardNSmith_thumbnail.jpg',
         target: 'tagdiv'
       } )
       .tagthisperson({
index 2d46575bc08adcb15d1ef3dbb0736372ade2d1d4..105ee0bd486cf1ef010a4e5161607c8cc47e5383 100644 (file)
   Popcorn.plugin( "tagthisperson" , (function(){
     
     var peopleArray = [];
+    // one People object per options.target
     var People = function(){
       this.name = "";
       this.contains = {};
-      this.toString = function(target) {
+      this.toString = function() {
         var r = [];
         for ( var j in this.contains) {
           if (this.contains.hasOwnProperty(j)) {
        * options variable
        */
       start: function(event, options){
-        options._p.contains[options.person] = options.person;
+        if ( options.image ) {
+          options._p.contains[options.person] = "<img src='" + options.image + "'/> " + options.person;
+        } else {
+          options._p.contains[options.person] = options.person;
+        }
+        //options._p.contains[options.person] = options.person;
         if (document.getElementById(options.target)) {
           document.getElementById(options.target).innerHTML  = options._p.toString();
         }
index 689bb796f7b91ca35bd0511e80ddb11141b3d689..7ce859c0d2e1ee443ec736f05c2002569d977303 100644 (file)
   <script>
     document.addEventListener('DOMContentLoaded', function () {
       var p = Popcorn('#video')
+      .volume(0)
+      .twitter({
+        start: '00:00:00:01', // seconds
+        end: 5, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #bipartisanship',
+        target: 'twitterdiv'
+      } )
       .twitter({
         start: 5, // seconds
-        end: 15, // seconds
-        title: 'Steve Song',
-        src: '@stevesong',
-        target: 'twitterdiv',
+        end: 10, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #economy',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 15, // seconds
+        end: 20, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #innovation',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 20, // seconds
+        end: 25, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #energy',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 30, // seconds
+        end: 35, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #education',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 40, // seconds
+        end: 45, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #infrastructure',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 50, // seconds
+        end: 55, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #spending',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 55, // seconds
+        end: 60, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #taxes',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 20, // seconds
+        end: 45, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #gov20',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 20, // seconds
+        end: 45, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #military',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 20, // seconds
+        end: 45, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #afghanistan',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 20, // seconds
+        end: 45, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #foreignpolicy',
+        target: 'twitterdiv'
+      } )
+      .twitter({
+        start: 20, // seconds
+        end: 45, // seconds
+        title: 'Oil Spill',
+        src: '#pbssotu #military',
+        target: 'twitterdiv'
       } )
       .twitter({
         start: 20, // seconds
         end: 45, // seconds
         title: 'Oil Spill',
-        src: '#oilspill',
+        src: '#pbssotu #bigthings',
         target: 'twitterdiv'
       } )
       .play();