-1

I want to show in a gallery all of the videos from our youtube channel. I am using <iframe> but it is only showing one video. How can I show all of the viedos from our channel?

<div>
<iframe src="https://www.youtube.com/embed/Wyq6YeoM2ZA?ecver=2" width="640" height="360" frameborder="5" style="position:absolute;width:70%;height:60%;left:15%" allowfullscreen playlist></iframe>
</div>
Max Pringle
  • 621
  • 6
  • 18
Awais_Butt
  • 3
  • 1
  • 8
  • 1
    Is there a specific reason to use the iframe HTML tag? You might want to read about why it's considered bad here: https://stackoverflow.com/questions/23178505/good-reasons-why-not-to-use-iframes-in-page-content#23178537 – Christian Heinrichs Sep 08 '17 at 18:41
  • Welcome to StackOverflow. Please take a moment to read the guidelines. – catbadger Sep 08 '17 at 18:41

2 Answers2

1

You can watch in Youtube API. It is documented well in several progamming languagues. Here is a snippet in javascript:

// Sample js code for playlists.list

// See full sample for buildApiRequest() code, which is not 
// specific to a particular youtube or youtube method.

buildApiRequest('GET',
                '/youtube/v3/playlists',
                {'channelId': 'UC_x5XG1OV2P6uZZ5FSM9Ttw',
                 'maxResults': '25',
                 'part': 'snippet,contentDetails'});

More on https://developers.google.com/youtube/v3/docs/playlists/list.

Tobias Alt
  • 453
  • 1
  • 3
  • 11
  • i read document it's complex as i already mention i am learning so i guess it's little hard for me now. is there anyother way to complete ? – Awais_Butt Sep 08 '17 at 19:50
0

This HTML will embed a player that will show all of your videos. Replace YOURCHANNELNAME with your channel name.

<iframe src="http://www.youtube.com/embed/?listType=user_uploads&list=YOURCHANNELNAME" width="480" height="400"></iframe>             
Max Pringle
  • 621
  • 6
  • 18