Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Why can't I embed some YouTube videos in my web page? (Video has the embeddable property set to true)

$
0
0

I'm trying to embed videos in my web page... I'm using @angular/youtube-player.

To get the videos I'm using YouTube API, my query params to it look something like this:

"videoEmbeddable": "true","videoCategoryId": "10","maxResults": "15","part": "snippet","type": "video",

So I thought if I set the videoEmbeddable to true I should only get videos that can be embedded. In the list of videos I got I have this one, for example: aZ5fQyiZgns

If I find that videoId in the YT API it says that it is embeddable

Embeddable is true

But once I try to visit this link https://www.youtube.com/embed/aZ5fQyiZgns it doesn't work and says "Video not available" which is the same thing I see in my webpage when I try to show it.

YT video error. Not available

I read YT might have been failing because I was accessing my app with IP, so I set a hostname in my hosts file but that didn't help.

Also tried using HTTPS but that didn't change anything either.

I found this https://stackoverflow.com/a/17156532/5126036. Might this be the reason I'm getting that error? Is there another way to filter videos that can actually be embedded?

I'm using Angular 13 for the frontend and my backend is on Django (3, 2, 9, 'final', 0)

Other video ids that are failing for me:

  • 50dZQkrqxAk
  • 0yW7w8F2TVA
  • Mhj15W23IjA
  • 9fawaFE0pPg
  • mdndTRMvPu0
  • y8OtzJtp-EM
  • PukKW3gY4uo
  • D2lSwosw9xY
  • UelDrZ1aFeY
  • 2TtgkKZNTa8
  • rjCBV6o_DSE

Note: I'm not a native English speaker, if there's something that can't be understood please let me know and I'll try to clarify.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>