1

I am using the youtube iframe api to embed newest uploaded videos from a youtube channel onto my webpage. I am successfully able to do this; however, I need to get the title of each video as well and display it within the html next to each video. So far, I cannot find a solution to do so.

This is my code to retrieve one video. I am using this method so that I can embed the videos within a carousel that I have made, with each embedded video fetching the next latest upload (a different index from the same playlist).

<iframe width="300" height="300" src="http://www.youtube.com/embed?autoplay=0&max-results=1&controls=0&showinfo=1&rel=0&listType=user_uploads&list=channelName&index=0" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

Can anyone provide me with some tips on how to obtain the title (and possibly other information related to the video such as a date)?

All help is greatly appreciated!

Thank You!

-TT

tt2244
  • 71
  • 11

1 Answers1

0

With the new YouTube API there's no way to do this using Javscript or jQuery. However, there seems to be solutions that use PHP:

Solution Using PHP

If you're not comfortable with PHP and/or you're not uploading a lot of YouTube Videos, I would suggest either hard-coding the titles into your HTML or creating a column(s) in your database for the relevant information.

Community
  • 1
  • 1
David Ro
  • 11
  • 3