SHARE
TWEET

Untitled

a guest Jan 24th, 2010 889 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="makingof">    
  2. <script type="text/javascript">
  3. //Sprungzeit ausrechnen
  4. var d = new Date(); //Datum erzeugen
  5. var curr_hour = d.getHours();
  6. var curr_hour_sec = curr_hour * 3600;
  7. var curr_min = d.getMinutes();
  8. var curr_min_sec = curr_min * 60;
  9. var curr_sec = d.getSeconds();
  10. var curr_sec_all = curr_hour_sec + curr_min_sec + curr_sec ; //Wie viele Sekunden sind seit 0:00 vergangen
  11. var curr_prozent = curr_sec_all / 19855; //Wie viel Prozent sind an Sekunden im Vergleich zu 19855s (=Videolänge 5:30:55) vergangen (19855s = 100% ; 86400 (24h) = 435%)
  12. //Wenn die vergangenen Sekunden größer sind als 100%, wird spraktisch vorne die Hunderterstelle weggenommen; aus 180% wird 80% bzw. aus 1,80 wird 0,80
  13. if (curr_prozent>1)
  14.         {
  15.         var curr_prozent_final = curr_prozent - 1;
  16.         }
  17. if (curr_prozent>2)
  18.         {
  19.         var curr_prozent_final = curr_prozent - 2;
  20.         }
  21. if (curr_prozent>3)
  22.         {
  23.         var curr_prozent_final = curr_prozent - 3;
  24.         }
  25. if (curr_prozent>4)
  26.         {
  27.         var curr_prozent_final = curr_prozent - 4;
  28.         }      
  29.  
  30. var sprungzeit = 19855 * curr_prozent_final; //finale Sprungzeit ausrechnen.
  31.        
  32. document.write(curr_hour + ":" + curr_min + ":"
  33. + curr_sec + ":" + curr_msec + " hahaha " + curr_sec_all + " " + curr_prozent + " " + curr_prozent_final);
  34.        
  35.       <video onload="video.currentTime=sprungzeit" width="320" height="240" src="file:///E:/Videobearbeitung/Das%20Paar/Rohmaterial/Das-Paar_Making-Of.ogv" autobuffer autoplay controls id="myVideo">
  36.  
  37.                <div class="video-fallback">
  38.  
  39.                     <br>Sie benoetigen einen Browser, der HTML5 unterstuetzt.
  40.              </div>
  41.  
  42.       </video>
  43.                
  44.                 </div>
  45.                 <script type="text/javascript">
  46. //var video2 = document.getElementsById("makingof").innerHTML[0];
  47. //var video = document.getElementsByTagName("video")[0];
  48. var video = document.getElementById("myVideo");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top