Advertisement
Guest User

Untitled

a guest
Sep 27th, 2011
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
  6. <script type="text/javascript" src="popup.js"></script>
  7. <link rel="stylesheet" type="text/css" media="all" href="style.css" />
  8. <script>
  9.  
  10. var tag = document.createElement('script');
  11. tag.src = "http://www.youtube.com/player_api";
  12. var firstScriptTag = document.getElementsByTagName('script')[0];
  13. firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
  14.  
  15. var player;
  16. function onYouTubePlayerAPIReady() {
  17. player = new YT.Player('player', {
  18. height: '390',
  19. width: '640',
  20. videoId: 'u1zgFlCw8Aw',
  21. events: {
  22.  
  23. 'onStateChange': onPlayerStateChange
  24. }
  25. });
  26. }
  27. function onPlayerReady(event) {
  28. event.target.playVideo();
  29. }
  30.  
  31. var done = false;
  32. function onPlayerStateChange(event) {
  33. if (event.data == YT.PlayerState.PLAYING && !done) {
  34. done = true;
  35. }
  36. }
  37. function stopVideo() {
  38. player.stopVideo();
  39. }
  40. </script>
  41. </head>
  42. <body>
  43.  
  44. <!-- #dialog is the id of a DIV defined in the code below -->
  45. <a href="#dialog" name="modal">clip 1</a><br /><br />
  46. <a href="#dialog2" name="modal">clip 2</a>
  47.  
  48. <div id="boxes">
  49.  
  50.  
  51. <!-- #customize your modal window here -->
  52.  
  53. <div id="dialog" class="window">
  54. <h1>Clip 1</h1>
  55. <div id="player"></div>
  56.  
  57.  
  58. <!-- close button is defined as close class -->
  59. <a href="#" class="close">Fermer</a>
  60.  
  61. </div>
  62. <div id="dialog2" class="window">
  63. <h1>Clip 2</h1>
  64. <div id="player"></div>
  65.  
  66. <!-- close button is defined as close class -->
  67. <a href="#" class="close">Fermer</a>
  68.  
  69. </div>
  70.  
  71. <!-- Do not remove div#mask, because you'll need it to fill the whole screen -->
  72. <div id="mask"></div>
  73. </div>
  74. </body>
  75. </html>
  76.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement