Advertisement
cipherhawk

embed-video-html

Dec 12th, 2022
906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.99 KB | None | 0 0
  1. source: https://stackoverflow.com/questions/2299347/how-do-i-embed-a-mp4-movie-into-my-html
  2.  
  3. <!-- "Video For Everybody" v0.4.1 by Kroc Camen of Camen Design <camendesign.com/code/video_for_everybody>
  4.     =================================================================================================================== -->
  5. <!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise       -->
  6. <!-- warning: playback does not work on iPad/iPhone if you include the poster attribute! fixed in iOS4.0                 -->
  7. <video width="640" height="360" controls preload="none">
  8.     <!-- MP4 must be first for iPad! -->
  9.     <source src="__VIDEO__.MP4" type="video/mp4" /><!-- WebKit video    -->
  10.     <source src="__VIDEO__.webm" type="video/webm" /><!-- Chrome / Newest versions of Firefox and Opera -->
  11.     <source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera -->
  12.     <!-- fallback to Flash: -->
  13.     <object width="640" height="384" type="application/x-shockwave-flash" data="__FLASH__.SWF">
  14.         <!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
  15.         <param name="movie" value="__FLASH__.SWF" />
  16.         <param name="flashvars" value="image=__POSTER__.JPG&amp;file=__VIDEO__.MP4" />
  17.         <!-- fallback image. note the title field below, put the title of the video there -->
  18.         <img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__"
  19.             title="No video playback capabilities, please download the video below" />
  20.     </object>
  21. </video>
  22. <!-- you *must* offer a download link as they may be able to play the file locally. customise this bit all you want -->
  23. <p> <strong>Download Video:</strong>
  24.     Closed Format:  <a href="__VIDEO__.MP4">"MP4"</a>
  25.     Open Format:    <a href="__VIDEO__.OGV">"OGG"</a>
  26. </p>
  27.  
  28.  
  29. <!-- ALTERNATE METHOD -->
  30. <video width="480" height="320" controls="controls">
  31. <source src="http://serverIP_or_domain/location_of_video.mp4" type="video/mp4">
  32. </video>
  33.  
Tags: html Video embed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement