How to embed a YouTube channel into a webpage

后端 未结 4 1300
悲&欢浪女
悲&欢浪女 2020-12-07 18:10

Can anyone suggest how I embed a youtube channel into a webpage - I am getting conflicting information from various sites, ideally using the custom player if possible? thank

相关标签:
4条回答
  • 2020-12-07 18:48

    In order to embed your channel, all you need to do is copy then paste the following code in another web-page.

    <script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=YourChannelName&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
    

    Make sure to replace the YourChannelName with your actual channel name.

    For example: if your channel name were CaliChick94066 your channel embed code would be:

    <script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=CaliChick94066&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
    

    Please look at the following links:

    YouTube on your site

    Embed YouTube Channel

    You just have to name the URL to your channel name. Also you can play with the height and the border color and size. Hope it helps

    0 讨论(0)
  • 2020-12-07 19:00

    I quickly did this for anyone else coming onto this page:

    <object width="425" height="344">
    <param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"</param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowScriptAccess" value="always"></param>
    <embed src="http://www.youtube.com/v/u1zgFlCw8Aw?fs=1"
      type="application/x-shockwave-flash"
      allowfullscreen="true"
      allowscriptaccess="always"
      width="425" height="344">
    </embed>
    </object>
    

    See the jsFiddle.

    0 讨论(0)
  • 2020-12-07 19:10

    Seems like the accepted answer does not work anymore. I found the correct method from another post: https://stackoverflow.com/a/46811403/6368026

    Now you should use:

    http://www.youtube.com/embed/videoseries?list=USERID And the USERID is your youtube user id with 'UU' appended.

    For example, if your user id is TlQ5niAIDsLdEHpQKQsupg then you should put UUTlQ5niAIDsLdEHpQKQsupg. If you only have the channel id (which you can find in your channel URL) then just replace the first two characters (UC) with UU.

    So in the end you would have an URL like this:

    http://www.youtube.com/embed/videoseries?list=UUTlQ5niAIDsLdEHpQKQsupg

    0 讨论(0)
  • 2020-12-07 19:12

    YouTube supports a fairly easy to use iframe and url interface to embed videos, playlists and all user uploads to your channel: https://developers.google.com/youtube/player_parameters

    For example this HTML will embed a player loaded with a playlist of all the videos uploaded to your channel. Replace YOURCHANNELNAME with the actual name of your channel:

    <iframe src="http://www.youtube.com/embed/?listType=user_uploads&list=YOURCHANNELNAME" width="480" height="400"></iframe>
    
    0 讨论(0)
提交回复
热议问题