Guest User

Untitled

a guest
Mar 15th, 2011
2,213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>HTML5 Video Test</title>
  5. <meta charset="UTF-8">
  6. </head>
  7. <body>
  8. <video id="video_in_page_source" controls="" poster="http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png">
  9. Your browser does not support the HTML5 Video spec.
  10. </video>
  11.  
  12. <a href="#" id="fullscreen">Go Fullscreen</a>
  13.  
  14. <script src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
  15. <script>
  16. $(document).ready(function(){
  17. var TEST_SRC = "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4";
  18. var videoE = document.getElementById('video_in_page_source');
  19.  
  20. // Switch the source and try to play, then fullscreen
  21. videoE.src = TEST_SRC;
  22.  
  23. videoE.load();
  24. videoE.play();
  25.  
  26. $("#fullscreen").click(function(){
  27. videoE.webkitEnterFullScreen(); // Throws exception :(
  28. });
  29. });
  30. </script>
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment