Results 1 to 7 of 7

Thread: how to embedd a Youtube video in my web page

  1. #1
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default how to embedd a Youtube video in my web page

    hi,
    i want to add a Youtube video in my web page,what is the proper code used for this?

    as this is the url http://www.youtube.com/watch?v=9W1dhqc-JBs&feature=fvst


    so how to add it?

  2. #2
    Join Date
    Oct 2009
    Posts
    38
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    try this:

    Code:
    <object width="560" height="340">
    <param name="movie" value="http://www.youtube.com/v/9W1dhqc-JBs&hl=en_US&fs=1&"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <embed src="http://www.youtube.com/v/9W1dhqc-JBs&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed>
    </object>

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,380
    Thanks
    31
    Thanked 148 Times in 142 Posts
    Blog Entries
    34

    Default

    You'd better use a code that is valid HTML 4 Strict (without the EMBED tag). You could use this one:
    Code:
    <!--[if IE]><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' style='position:absolute;left:10%; top:10%; height:80%;width:80%'><![endif]--><!--[if !IE]><!--><object type='application/x-shockwave-flash' style='position:absolute;left:10%; top:10%; height:80%;width:80%' data='http://www.youtube.com/v/9W1dhqc-JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' ><!--<![endif]--><param name='movie' value='http://www.youtube.com/v/9W1dhqc-JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' ><param name='allowFullScreen' value='true' ><param name='wmode' value='transparent' ><param name='flashvars' value='autoplay=true' ><param name='allowNetworking' value='internal'><param name='allowScriptAccess' value='never'></object>
    ===
    Arie Molendijk

  4. #4
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default

    thn


    cn u explain it more

    <!--[if IE]>
    <object classid='clsid27CDB6E-AE6D-11cf-96B8-444553540000' style='position:absolute;left:10%; top:10%; height:80%;width:80%'>
    <![endif]-->

    <!--[if !IE]>

    <!--><object type='application/x-shockwave-flash' style='position:absolute;left:10%; top:10%; height:80%;width:80%' data='http://www.youtube.com/v/9W1dhqc-JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' >

    <!--<![endif]-->

    <param name='movie' value='http://www.youtube.com/v/9W1dhqc-JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' >

    <param name='allowFullScreen' value='true' >

    <param name='wmode' value='transparent' >

    <param name='flashvars' value='autoplay=true' >

    <param name='allowNetworking' value='internal'>

    <param name='allowScriptAccess' value='never'>

    </object>



    why this coding used

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,380
    Thanks
    31
    Thanked 148 Times in 142 Posts
    Blog Entries
    34

    Default

    Gurmeet, you copied the code incorrectly. It should be:
    Code:
    <!--[if IE]>
    <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' style='position:absolute;left:10%; top:10%; height:80%;width:80%'>
    <![endif]-->
    
    <!--[if !IE]><!-->
    <object type='application/x-shockwave-flash' style='position:absolute;left:10%; top:10%; height:80%;width:80%' data='http://www.youtube.com/v/9W1dhqc-JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&Amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' >
    <!--<![endif]-->
    
    <param name='movie' value='http://www.youtube.com/v/9W1dhqc-JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' >
    
    <param name='allowFullScreen' value='true' >
    
    <param name='wmode' value='transparent' >
    
    <param name='flashvars' value='autoplay=true' >
    
    <param name='allowNetworking' value='internal'>
    
    <param name='allowScriptAccess' value='never'>
    
    </object>
    .

    Explanations:
    This part:
    Code:
    <!--[if IE]>
    <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' style='position:absolute; left:10%; top:10%; height:80%; width:80%'>
    <![endif]-->
    
    <!--[if !IE]><!-->
    <object type='application/x-shockwave-flash' style='position:absolute; left:10%; top:10%; height:80%; width:80%' data='http://www.youtube.com/v/9W1dhqc-
    JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' >
    <!--<![endif]-->
    
    <param name='movie' value='http://www.youtube.com/v/9W1dhqc-
    JBs&amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1' >
    is for allowing both Interfnet Explorer and the non-IE browsers to load the video. The param is needed for IE.

    The other params are optional. Here's what they do:
    <param name='allowFullScreen' value='true'> enables full screen mode.

    <param name='wmode' value='transparent'> makes flash transparent, meaning that elements with sufficient z-index can be put on top of it.

    <param name='flashvars' value='autoplay=true'> enables autoplay, not needes for YouTube if you specify the autoplay in the URL.

    <param name='allowNetworking' value='internal'> and <param name='allowScriptAccess' value='never'> ensure that if you click on the video, it will not open a new YouTube-window.

    For the &amp;hl=nl&amp;fs=1&amp;autoplay=1&amp;showinfo=0&amp;rel=0&amp;start=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1-part in the URL, google around.

    ===
    Arie.

  6. #6
    Join Date
    Mar 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try building an embedded code to upload in youtube. OR try using the simple uploader.

  7. #7
    Join Date
    Feb 2010
    Location
    3 Locust Street, Suite A Assonet, MA 02702
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    If you want it to embed in HTML than use following code

    <object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/9W1dhqc-JBs&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9W1dhqc-JBs&hl=en_US&fs=1" type="application/x-shockwave-flash" width="480" height="295" allowscriptaccess="always" allowfullscreen="true"></embed></object>

    If you want it to simply upload than use following

    http://www.youtube.com/watch?v=9W1dhqc-JBs

Bookmarks

Posting Permissions

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