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

"This video is unavailable." in Youtube IFrame API - Why, and how to fix?

$
0
0

I have a Youtube IFrame embed that I'm loading with the IFrame API via JS. When I try playing certain videos (it seems to usually be ones containing copyrighted music, although this isn't always the case), it simply displays "This video is unavailable." with no further message. It isn't a region restriction, as when I try to load those, that specific error is shown. These are videos that play just fine on the normal Youtube page so I have no idea what's causing this error. Is there a way to get these videos to play in the IFrame embed, or at all? I'm not entirely committed to the IFrame API method, getting these videos to play is my #1 priority.

EDIT: I was able to solve this by specifying a videoId in my YT.Player constructor. I'm seeing consistent behavior that the videos will be unavailable when a videoId is not specified on initialization but they will play if one is specified.


Viewing all articles
Browse latest Browse all 3718

Latest Images

Trending Articles



Latest Images

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