javascript/youtube api check state for playback restrictions -


Javascript / YouTube API check status for playback restrictions

The problem is that I embed from gdata / youtube-api and sometimes it does not allow playback video restrictions or embeds, so I was checking a state or something to handle it. I & amp; Tried to add format = 5 & Amp; -1 Trying an event with any luck, any idea will be highly appreciated. Function on PlayerState Change (Event) {if (event.data == -1) {// Rest of code}} Thanks in advance.

Edit3 / Solution to this problem: As you have on-set that function for the function on Capture Event and on-screen error, this problem was resolved. PlayerError (event) {if (event.data === 150} event.data === 101} {// left here}}

Edit: Add more Edit code 2: Error code matching is the only answer to the problem that I do not know how to capture the error code to any idea?

  


Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -