Advertisement
metalx1000

Basic Video Player with Effects for Local Videos

Jul 23rd, 2013
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.08 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <style>
  4.         #myvideo {
  5.             //-webkit-filter: sepia(1);
  6.             //-webkit-filter: blur(3px);
  7.             -webkit-filter: grayscale(1);
  8.             //-webkit-filter: sepia(1);
  9.             //-webkit-filter: brightness(2.5);
  10.             //-webkit-filter: contrast(5);
  11.             //-webkit-filter: hue-rotate(125deg);
  12.             //-webkit-filter: invert(1);
  13.             //-webkit-filter: saturate(3);
  14.             //-webkit-filter: opacity(0.3);  
  15.         }
  16.  
  17.     </style>
  18.  
  19. </head>
  20. <body>
  21.     <h1>HTML5 local video file player example</h1>
  22.     <div id="message"></div>
  23.     <input type="file" accept="video/*"/>
  24.     <video id="myvideo" controls autoplay></video>
  25.  
  26.     <script>
  27.      play = function playSelect(event) {
  28.         var file = this.files[0];
  29.         var videoNode = document.querySelector('video');
  30.         var fileURL = URL.createObjectURL(file);
  31.  
  32.         videoNode.src = fileURL;
  33.      },
  34.      inputNode = document.querySelector('input');
  35.  
  36.  
  37.     inputNode.addEventListener('change', play, false);
  38.  
  39.     </script>
  40. </body>
  41.  
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement