5

I'm trying to embed a Youtube channel into a HTML page.

For example I take this channel address: http://www.youtube.com/aaaa

I used this code:

<html>
<head>
</head>
<body>
    <iframe src="http://www.youtube.com/aaaa"></iframe> 
</body>
</html>

The problem is that it doesn't work. I tried with another site, and it works. What can be the problem?

Ry-
  • 218,210
  • 55
  • 464
  • 476
Pytagora
  • 77
  • 1
  • 1
  • 7
  • possible duplicate of [How do I embed YouTube video channel in a web page?](http://stackoverflow.com/questions/8212370/how-do-i-embed-youtube-video-channel-in-a-web-page) – Flexo Feb 03 '13 at 11:24
  • Referring you to a similar question answered by me on stackoverflow - http://stackoverflow.com/questions/8212370/how-do-i-embed-youtube-video-channel-in-a-web-page/14671448#14671448 – user2015233 Feb 03 '13 at 10:24

4 Answers4

2

The problem seems to be induced by this URL:http://www.youtube.com/aaaa.

I tried some other URLs and it works.

You can try some URLs easily here.


Try this:

  <script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&amp;up_channel=aaaa&amp;synd=open&amp;w=320&amp;h=390&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>
Po-Jen Lai
  • 411
  • 1
  • 8
  • 18
  • I edited my answer.That works if you uploaded your own videos. If you want to share playlist, just use embed code provided by Youtube. – Po-Jen Lai Aug 20 '12 at 16:03
  • This is better, works. But I would like to can press Subscribe button without opening a new tab... – Pytagora Aug 20 '12 at 16:14
  • Sorry I don't know how to do that.Maybe this tool can help you. http://www.widgetbox.com/widgets/make?code=youtube – Po-Jen Lai Aug 20 '12 at 16:27
  • This works fine. But interface is ugly. Is there any way direct to youtube ? this goes over google modules. – alicanbatur Aug 04 '14 at 13:17
  • The answer is missing the html that is the placeholder for the iframe in the page. This will not work with just a script tag. I need some kind of html that the script tag sends the info to. Please fix the answer. It is unusable as it is. – Joshua Robison Jul 18 '22 at 03:40
0
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/aaaa" frameborder="0">
</iframe>

This was taken from youtube here

it appears IE (and others) can only use [youtube.com /embed/ videoID] (HTML5 Player) - at least the way I am implementing them.

Clinton Ward
  • 2,441
  • 1
  • 22
  • 26
  • it appears IE (and others) can only use [youtube.com /embed/ videoID] (HTML5 Player) - at least the way I am implementing them. – Clinton Ward Aug 20 '12 at 16:04
-1

Try this:

<div name="iframe" style="width:100%; height:635px; border:2px solid grey; overflow:hidden">
  <iframe src="http://yourchannel-URL" style="width:100%; height:700px; margin-top: -65px" scrolling="true">
     If you can see this, your browser doesn't support iframes. Click <a href="http://mychannel.url">here to see my YouTube channel.</a>
  </iframe>
</div>

This should embed a complete youtube channel without a youtube search bar.

Dominik
  • 6,078
  • 8
  • 37
  • 61
Alfred
  • 21,058
  • 61
  • 167
  • 249
-2

To display a gallery of thumbnails of your YouTube Channel's most recent videos, you can use an iframe:

<iframe
    onload="javascript:this.style.height = this.contentWindow.document.body.scrollHeight + 'px';"
    scrolling="no"
    height="600"
    marginheight="0"
    frameborder="0"
    width="480"
    src="http://youtubechannelembed.com/gallery.php?vids=9&user=doitfordummies&row=3&width=150&margin_right=15&desc=100&title=30&views=1&likes=1&dislikes=1&fav=1">
</iframe>
Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
  • 2
    The domain you have linked to here appears to appears to have been taken over by some scam site. – Terje Mar 02 '19 at 22:01