Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2012
    Posts
    137
    Thanks
    1
    Thanked 1 Time in 1 Post

    Best way to handle video

    Hello,

    I am trying to get a video to work. First of all, what is the most reliable way to do this for all browsers, etc? Embed it in the current page or provide a link for them which will download the video and then play automatically with whatever they have on their computer?

    I tried wmbedding it as a SWF but I couldn't get the skin to cooperate! I tried the video tag with othe methods. Damn this sucks!!!

  • #2
    Regular Coder Nerevarine's Avatar
    Join Date
    Jan 2013
    Location
    Phendrana Drifts, Tallon IV, W-Class
    Posts
    285
    Thanks
    0
    Thanked 17 Times in 17 Posts
    Hello. It depends on what format of video you are using, if you are using HTML5 then you can use this code:
    Code:
    <video width="320" height="240" controls>
      <source src="movie.mp4" type="video/mp4">
      <source src="movie.ogg" type="video/ogg">
    Your browser does not support the video tag.
    </video>
    Where each 'source' is a different format of video, and the browser will check for video compatibility with each format. In the event of no compatibility, it displays: Your browser does not support the video tag.


    If you are using flash, this is my preferred code:

    Code:
    	<object width="550" height="400" data="shuriken.swf" id="video">
    	<param name="movie" value="shuriken.swf" />
    	<param name="allowFullScreen" value="true" />
    	<param name="allowscriptaccess" value="always" />
    	<embed src="shuriken.swf" type="application/x-shockwave-flash"
    	allowscriptaccess="always" allowfullscreen="true" width="800" height="605" />
    	</object>
    This allows you to change the size of things. The object width/height determines the size on the page itself. After that it's just some CSS fidgeting and you have a nicely positioned functional video in your page.

    PS. 'Shuriken.swf' is where you'd place your video name. If it is not in the root folder, make sure to have the directory correct. Also, the 'id' is simply a CSS caller.

    Hope this helps.
    Last edited by Nerevarine; 01-10-2013 at 02:52 PM. Reason: Added PS.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •