1

I have an great working iframe code for the latest video published on my YouTube channel. The issue is that it pulls all videos uploaded to the channel, not just the public videos. Is there a way to customize the code to just get the public videos?

    <iframe width="550" height="325" src="https://www.youtube.com/embed?max-results=1&amp;controls=0&amp;showinfo=0&amp;rel=0&amp;listType=user_uploads&amp;list=ChannelName" frameborder="0" allowfullscreen=""></iframe>
Valerie M
  • 11
  • 3
  • Can be considered a workaround / possible solution: mark the other videos as private? – Mauricio Arias Olave Oct 07 '20 at 15:31
  • Another approach is: Use YouTube Data API for retrieve the latest video uploaded - check [my answer](https://stackoverflow.com/a/63531425/4092887) for more information. – Mauricio Arias Olave Oct 07 '20 at 16:26
  • Check [this question and its accepted answer](https://stackoverflow.com/q/49315473/4092887) - it has a working sample. – Mauricio Arias Olave Oct 07 '20 at 16:31
  • @MauricioAriasOlave, thank you for the suggestions! Unfortunately I found the same results when using the YouTube Data API key for most recent upload, it just pulls everything. I'm afraid we might have to create a new playlist and just attached all public videos to that. It'll be more steps but if it prevents the private videos from showing it may be the best solution. Thanks again! – Valerie M Oct 08 '20 at 16:12

0 Answers0