Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Chapter 5: Audio and video

    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 580
    Comment on it


    HTML5 have native feature for audio and video facility and for it you do not need to have flash.

    There are two tags <audio> and <video> it is very simple to add media in your website for it you just have to set the source path. Both tags have their useful attribute, which provides users more feature and make work easy.

    Before HTML5, there is no such HTML feature like this to add audio and video. Its support all major browser including IE9+

    The videos which are supported by video tag are still in HTML5 draft but mostly used video formats are

    • Ogg
    • mpeg4
    • MP4

     
    Video tag has some attribute which is very helpful for your media-

    • autoplay
    • autobuffer
    • controls
    • loop
    • preload
    • poster

     

    Example for video tag -

    <video src="video.ogg"  width="200" height="180" controls>
       Your browser does not support the <video> element.   
    </video>

     

    Same as audio tag some attribute -

    • autoplay
    • autobuffer
    • controls
    • loop
    • preload

     

    Example for audio tag -

    <audio controls autoplay>
     <source src="path/audio.ogg" type="audio/ogg" />
     <source src="path/audio.wav" type="audio/wav" />
    </audio>

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: