Results 1 to 8 of 8

Thread: [RESOLVED] <video> in html5

  1. #1
    Hyperactive Member Aash's Avatar
    Join Date
    Dec 09
    Location
    Earth
    Posts
    491

    Resolved [RESOLVED] <video> in html5

    hi all

    I've tried the following html tags and it's not working, can anyone help me out..
    i've downloaded a youtube video and i want to display it on page.

    Code:
    <!DOCTYPE html>
    <html>
    <body>
    
    
    <video width="320" height="240" controls="controls">
        <source src="myvideo.flv" type="video/mp4" />
    	
    </video>
    </body>
    </html>
    on chrome the video don't run and on firefox it says 'no video with supported format and MIME type found'
    thanks in advance..

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,719

    Re: <video> in html5

    Try replacing video with object and see if that makes a difference.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: <video> in html5

    Only MP4, WebM and Ogg are supported formats! See this: http://www.w3schools.com/html5/html5_video.asp (scroll down to "Video Formats and Browser Support")

    But in your code, you are trying to play an FLV (flash movie), and you have specified the type as mp4. Insert the link to the mp4 movie there, instead of myvideo.flv.

    For example:
    HTML Code:
    <!DOCTYPE html>
    <html>
    <body>
    
    
    	<video width="480" height="410" controls="controls">
    	<source src="http://video-js.zencoder.com/oceans-clip.mp4" type="video/mp4" />
    	
    </video>
    </body>
    </html>

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  4. #4
    Hyperactive Member Aash's Avatar
    Join Date
    Dec 09
    Location
    Earth
    Posts
    491

    Re: <video> in html5

    thankyou both

    I tried this code but video isn't displaying using any browser.
    Quote Originally Posted by akhileshbc View Post
    For example:
    HTML Code:
    <!DOCTYPE html>
    <html>
    <body>
    
    
    	<video width="480" height="410" controls="controls">
    	<source src="http://video-js.zencoder.com/oceans-clip.mp4" type="video/mp4" />
    	
    </video>
    </body>
    </html>

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: <video> in html5

    Quote Originally Posted by Aash View Post
    thankyou both

    I tried this code but video isn't displaying using any browser.
    Try it in Google Chrome. In my PC, I have the latest Chrome(20.0.1132.57 m).

    If you want to play the same video in Firefox(4+) or Opera(10.6+), you have to include the WebM or Ogg format video as separate <source>.

    You could see the browsers supporting the specific video format in the link that I have shown you(w3schools).

    So, it would be like this:
    Code:
    <!DOCTYPE html>
    <html>
    <body>
    
    	<video width="480" height="410" controls="controls">
    		<source src="http://video-js.zencoder.com/oceans-clip.mp4" type="video/mp4" />
    		<source src="http://video-js.zencoder.com/oceans-clip.ogg" type="video/ogg" />
    	</video>
    	
    </body>
    </html>

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  6. #6
    Hyperactive Member Aash's Avatar
    Join Date
    Dec 09
    Location
    Earth
    Posts
    491

    Re: <video> in html5

    thanks

  7. #7
    Frenzied Member tr333's Avatar
    Join Date
    Nov 04
    Location
    /dev/st0
    Posts
    1,426

    Re: [RESOLVED] <video> in html5

    There's a great tutorial on using the <video> tag in HTML5 over at HTML5 Rocks. It also has some info on using video+js, video+css, video+canvas, and video+svg.
    Don't forget about rep points if you think a post has benefited you in any way.
    Just another Perl hacker,

  8. #8
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: [RESOLVED] <video> in html5

    Quote Originally Posted by tr333 View Post
    There's a great tutorial on using the <video> tag in HTML5 over at HTML5 Rocks. It also has some info on using video+js, video+css, video+canvas, and video+svg.
    That's cool

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

Posting Permissions

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