Advertisement
Guest User

MY CODE (video PROTOTYPE).

a guest
Jan 24th, 2013
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.42 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Video Prototype</title>
  6. <!-- CSS -->
  7.  
  8. <style type="text/css">
  9. @import url("css/css.css");
  10. @import url "css/css.css";
  11. </style>
  12.  
  13. <link href="http://contribute.juicepharma.com/html5videomenu/example237/css/player.css" rel="stylesheet" type="text/css" />
  14.  
  15. <!-- Mobile Specific Meta Tags -->
  16. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  17. <script type="text/javascript" src="http://use.typekit.com/yil2hux.js"></script>
  18. <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
  19.  
  20. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  21.  
  22. <!-- Add mousewheel plugin (this is optional) -->
  23. <script type="text/javascript" src="http://contribute.juicepharma.com/html5videomenu/fancyapps-fancyBox-e4836f7/lib/jquery.mousewheel-3.0.6.pack.js"></script>
  24.  
  25. <!-- Add fancyBox main JS and CSS files -->
  26. <script type="text/javascript" src="http://contribute.juicepharma.com/html5videomenu/fancyapps-fancyBox-e4836f7/source/jquery.fancybox.js?v=2.1.3"></script>
  27. <link rel="stylesheet" type="text/css" href="http://contribute.juicepharma.com/html5videomenu/fancyapps-fancyBox-e4836f7/source/jquery.fancybox.css?v=2.1.2" media="screen" />
  28.  
  29. <!-- Add Button helper (this is optional) -->
  30. <link rel="stylesheet" type="text/css" href="http://contribute.juicepharma.com/html5videomenu/fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
  31. <script type="text/javascript" src="http://contribute.juicepharma.com/html5videomenu/fancyapps-fancyBox-e4836f7/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
  32.  
  33. <!-- The cuepoint stuff is here -->
  34. <script src='http://contribute.juicepharma.com/html5videomenu/example237/js/cuepoint.js'></script>
  35.  
  36. <script src='http://contribute.juicepharma.com/html5videomenu/example237/js/script.js'></script>
  37.  
  38. <script>
  39. $(document).ready(function(){
  40. //Slides object with a time (integer) and a html string
  41. var slides = {
  42. 0: '<div id="playdiv" onclick="vidplay()"><img src="imgs/poster1.png" style="min-height: 300px;"/></div>',
  43. 2: '<div id="playdiv" onclick="vidplay()"><img src="imgs/poster1.png" style="min-height: 300px;"/></div>',
  44. 3: '<div id="playdiv" onclick="vidplay()"><img src="imgs/poster1.png" style="min-height: 300px;"/></div>',
  45. 4: '',
  46. 5: '',
  47. 6: '<div id="playdiv" onclick="vidplay()"><img src="http://s3.freefoto.com/images/01/10/01_10_1_web.jpg" /style="min-height: 300px;"/></div>',
  48. 10:'<div id="playdiv" onclick="vidplay()"><img src="imgs/poster1.png" style="min-height: 300px;"/></div>',
  49. }
  50. //Start cuepoint and pass in our the subtitles we want
  51. cuepoint.init(slides);
  52.  
  53. //You can set your own skip to links by using the cuepoint.setTime(seconds) function
  54. $('#1').click(function(){ cuepoint.setTime(1)();});
  55. $('#2').click(function(){ cuepoint.setTime(2)});
  56. $('#3').click(function(){ cuepoint.setTime(6)});
  57. $('#4').click(function(){ cuepoint.setTime(10)});
  58. });
  59.  
  60. // function vidplay() {
  61. // var video = document.getElementById("video");
  62. // var button = document.getElementById("play");
  63. // if (video.paused) {
  64. // video.play();
  65.  
  66.  
  67. function vidplay() {
  68. var video = document.getElementById("video");
  69. var button = document.getElementById("play");
  70. if (video.paused) {
  71. video.play();
  72. $(playdiv).find('img').css("display","none");
  73.  
  74.  
  75. } else {
  76. video.pause();
  77. button.textContent = ">";
  78. }
  79. }
  80.  
  81. $(document).ready(function() {
  82. $('.hover').bind('touchstart touchend', function(e) {
  83. e.preventDefault();
  84. $(this).toggleClass('hover_effect')
  85.  
  86. });
  87. });
  88.  
  89. </script>
  90.  
  91. <script>
  92. var video = document.getElementById('video');
  93. video.addEventListener('click',function(){
  94. video.play();
  95. },false);
  96.  
  97. var video = document.getElementById('video');
  98. function doSomething(){ alert("works"); }
  99. video.addEventListener("touchstart", video.play();
  100. }, false);
  101.  
  102. </script>
  103.  
  104. <!-- End Cuepoint example code -->
  105.  
  106. </head>
  107.  
  108. <body>
  109.  
  110. <div id="page" style="position: relative; width: 700px; margin: 0 auto;">
  111.  
  112. <div id="container">
  113.  
  114. <header>
  115.  
  116. <hgroup>
  117.  
  118. <h1>Prototype..</h1>
  119.  
  120. </hgroup>
  121.  
  122. <br>
  123. <br>
  124.  
  125. </header>
  126.  
  127. <!-- Start Cuepoint -->
  128.  
  129. <div class="vidBox" id="box">
  130.  
  131. <section id='cuePlayer'>
  132. <video class="vid" id='video' height="300" width="500" onclick="vidplay()">
  133. <source src="http://contribute.juicepharma.com/html5videomenu/video/Scenario5-1.mp4" type="video/mp4" />
  134. <source src="http://contribute.juicepharma.com/html5videomenu/video/Scenario5-1.webm" type="video/webm" />
  135. <source src="http://contribute.juicepharma.com/html5videomenu/video/Scenario5-1.ogv" type="video/ogg" />
  136. </video>
  137. <div id='subtitles' style="position: absolute; min-height: 300px; margin-top: -300px;"></div>
  138. </section>
  139. </div>
  140.  
  141. <!-- div Comes in at the end -->
  142.  
  143. <div id="other" style="display: none; width:400px; height:300px;">
  144.  
  145. <center><img src="http://gifs.gifbin.com/1233925271_8be9acc.gif"></center>
  146.  
  147. </div>
  148.  
  149. <!-- / div Comes in at the end -->
  150.  
  151. <div id="intro">
  152.  
  153. </div>
  154.  
  155. <div id='thumbs' style="margin-top: 155px;">
  156. <ul>
  157. <li id="one"><img id='1' src='imgs/marker.png' alt='cuepoint image' class='thumbnail' style="padding: 20px;"/><li>
  158.  
  159. <li id="two"><img id='2' src='imgs/marker.png' alt='cuepoint image' class='thumbnail' style="padding: 20px;"/><li>
  160.  
  161. <li id="three"><img id='3' src='imgs/marker.png' alt='cuepoint image' class='thumbnail' style="padding: 20px;"/><li>
  162.  
  163. <li id="four"><img id='4' src='imgs/marker.png' alt='cuepoint image' class='thumbnail' style="padding: 20px;"/><li>
  164. </div>
  165.  
  166. <footer>
  167.  
  168. <a id="various3" href="http://www.jquery.com" class="noScroll" name="various3"><div id="frame_btn">Push</div></a>
  169.  
  170.  
  171. <div id="img1" style="background: black;">
  172.  
  173. </div>
  174.  
  175.  
  176. <!-- Actual Play / Pause Button -->
  177.  
  178. <div style="margin-top: 25px; position: absolute;"><button id="play" onclick="vidplay()">&gt;</button></div>
  179.  
  180. <!-- / Actual Play / Pause Button -->
  181.  
  182.  
  183. <script type="text/javascript">
  184.  
  185. $("#various3").fancybox({
  186. 'width' : '500',
  187. 'height' : '300',
  188. 'autoScale' : false,
  189. 'transitionIn' : 'none',
  190. 'transitionOut' : 'none',
  191. 'type' : 'iframe'
  192. });
  193.  
  194. </script>
  195.  
  196. </footer>
  197.  
  198. </div>
  199. </div>
  200. </div>
  201.  
  202. </body>
  203. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement