]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
merged and fixed overlay with new index.html
authorScottDowne <sdowne@learn.senecac.on.ca>
Wed, 30 Jun 2010 19:50:36 +0000 (15:50 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Wed, 30 Jun 2010 19:50:36 +0000 (15:50 -0400)
index.html
popcorn.js
style.css
xml/webMadeMovies.xml

index 0342b01343cce178a7f260907aab05140dbf2d6b..3d42538fce9132c9d82acd034af842d0b5d60dae 100644 (file)
@@ -69,9 +69,8 @@
           <!-- Start Left Contents -->
           <div class="left-content">
             <!-- Start Video Div -->
-            <div class="video-div">
+            <div id="videoContainer" class="video-div">
               <video width="530px" height="299px" src="http://a52.video2.blip.tv/7320003802153/Etherworks-WebMadeMovies3BuildingABetterInternet799.ogg" data-timeline-sources="xml/webMadeMovies.xml" controls></video>
-              <div id="sub"></div>
                 <!-- Start Video Info -->
                 <div class="video-info">
                   <!-- Start Choose Language -->
index 87d75a41c1f7888a41b64a251fa3578a76168121..9c85d4979c9074cd489948083162b147992a4c5d 100644 (file)
@@ -98,8 +98,6 @@
     }
   };
 
-  
-  
   ////////////////////////////////////////////////////////////////////////////
   // Command objects
   ////////////////////////////////////////////////////////////////////////////
     // Creates a div for all overlays to use
     if (!VideoManager.overlayDiv) {
       VideoManager.overlayDiv = document.createElement('div');
-      VideoManager.overlayDiv.setAttribute('style', 'position:absolute;top:20px;left:20px');
-      this.videoManager.videoElement.parentNode.appendChild(VideoManager.overlayDiv);
+      VideoManager.overlayDiv.setAttribute('style', 'position:absolute;top:1px;left:1px');
+      document.getElementById("videoContainer").appendChild(VideoManager.overlayDiv);
     }
     
     // Checks for a url of an image to overlay onto the video
   // Child commands. Uses onIn() and onOut() to do time based operations
   var SubtitleCommand = function(name, params, text, videoManager) {
     VideoCommand.call(this, name, params, text, videoManager);
+
+    // Creates a div for all subtitles to use
+    if (!SubtitleCommand.subDiv) {
+      SubtitleCommand.subDiv = document.createElement('div');
+      SubtitleCommand.subDiv.setAttribute('style', 
+        'position:absolute;top:240px;left:1px;color:white;font-weight:bold;font-family:sans-serif;text-shadow:black 1px 1px 3px;font-size:22px;width:820px;');
+      document.getElementById("videoContainer").appendChild(SubtitleCommand.subDiv);
+    }
     this.onIn = function() {
       var i = document.getElementById("language").selectedIndex;
       google.language.translate(this.text, '', document.getElementById("language").options[i].getAttribute("val"), function(result) {
-        document.getElementById("sub").innerHTML  = result.translation;
+        SubtitleCommand.subDiv.innerHTML = result.translation;
       });
       
     };
     this.onOut = function() {
-      document.getElementById("sub").innerHTML  = "";
+      SubtitleCommand.subDiv.innerHTML = "";
     };
   };
 
index b04ba45ec9e8051e439daf8e149ab8a06405a2f3..8b3c41251a3f95e80e5ce8a6aeabe91553e21417 100644 (file)
--- a/style.css
+++ b/style.css
@@ -237,6 +237,7 @@ display: inline;
 /* Left Content */
 
 .video-div{
+position:relative;
 border: 2px solid #cc433c;
 margin-bottom: 15px;
 -webkit-box-shadow: -1px 1px 1px #d9d9d9;
@@ -486,14 +487,3 @@ footer .footer_drumbeat{
 width:480px;
 }
 
-#sub { 
-position:absolute;
-top:350px;
-left:300px;
-color:white;
-font-weight:bold;
-font-family:sans-serif;        
-text-shadow:black 1px 1px 3px;
-width:820px;   
-font-size:22px;
-}
index 6309526a93e16a4a1310c40d6fc7ac60568fd506..320cee76ee8da4228a41ee6e62c6e4475d5ed742 100644 (file)
       <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>
+      <footnote in="00:00:00" out="00:14:00" overlay="images/overlay/footnote.png" target="footnotediv"> This video made exclusively for drumbeat.org </footnote>
     </footnotes>
     <resources>
       <twitter source="#oilspill" title="BP Oil Spill" target="twitter" width="238" height="160"/>
-      <twitter in="00:00:01:00" out="00:00:20:00" title="Celine Celine" source="from:celinecelines" target="personaltwitter" width="238" height="120"/>
+      <twitter in="00:00:01:00" out="00:00:20:00" title="Celine Celine" overlay="images/overlay/twitter.png" source="from:celinecelines" target="personaltwitter" width="238" height="120"/>
       <attribution in="00:00:1:00" out="00:40:00" target="container5" resourceid="attrib" />
       <attribution in="00:42:00" out="00:00:48:00" target="container5">A Shared Culture, Jesse Dylan</attribution>
-      <flickr in="00:01:00" out="00:20:00" target="personalflickr" userid="13072070" numberofimages="8" padding="4px"/>
+      <flickr in="00:01:00" out="00:20:00" target="personalflickr" overlay="images/overlay/flickr.png" userid="13072070" numberofimages="8" padding="4px"/>
     </resources>
     <videotags>
       <videotag in="00:00:03:00" out="00:00:14:00">Celine Celine</videotag>
@@ -74,8 +74,8 @@
       <videotag in="00:00:39:00" out="00:00:41:00">Celine Celine</videotag>
     </videotags>
     <map>
-      <location id="mapacc" resourceid="acchomepage" in="00:00:01:00" out="00:00:32:00" lat="30.1580" long="-97.7388" target="container2" zoom="8"/>
-      <location id="mapsaopaulo" resourceid="saupaulowiki" in="00:00:32:00" out="00:01:00:00" lat="-23.55" long="-46.6388" target="container2" zoom="6"/>
+      <location id="mapacc" resourceid="acchomepage" in="00:00:01:00" out="00:00:32:00" lat="30.1580" long="-97.7388" target="container2" overlay="images/overlay/googlemap.png" zoom="8"/>
+      <location id="mapsaopaulo" resourceid="saupaulowiki" in="00:00:32:00" out="00:01:00:00" lat="-23.55" long="-46.6388" target="container2" overlay="images/overlay/googlemap.png" zoom="6"/>
     </map>
     <news>
       <googlenews in="00:05:00" out="00:10:00" target="googlenewsdiv"/>