Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>HTML5 Video Test</title>
- <meta charset="UTF-8">
- </head>
- <body>
- <video id="video_in_page_source" controls="" poster="http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png">
- Your browser does not support the HTML5 Video spec.
- </video>
- <a href="#" id="fullscreen">Go Fullscreen</a>
- <script src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
- <script>
- $(document).ready(function(){
- var TEST_SRC = "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4";
- var videoE = document.getElementById('video_in_page_source');
- // Switch the source and try to play, then fullscreen
- videoE.src = TEST_SRC;
- videoE.load();
- videoE.play();
- $("#fullscreen").click(function(){
- videoE.webkitEnterFullScreen(); // Throws exception :(
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment