YouTube iFrame has intermittent download errors

Our software allows users to mix various media, including YouTube videos, together on a consistent timeline. We occasionally experience errors loading YouTube videos in our player. We use the youtube iframe API. First, we manually create the inline YouTube iframe, and then create the YouTube iframe API instance by passing it to the iframe.

When this problem occurs, it appears as follows: The YouTube player is a black screen with a download symbol. He remains in this state for about a minute (sometimes more) and as a result gives an error: “An error has occurred, try again later,” although sometimes the player simply remains black for an indefinite period. During this one-minute wait, we checked the "Stats for Nerds" panel and saw that the video seemed to start a cycle of loading different resolutions. You can see this happening starting at 1:00 of this video:

https://www.cubby.com/pl/Instant+meeting+2013-12-31.webm/_8cbafbaed7c64d828b260b41cd9db8dc

We see that the cycle goes through such permissions as:

426 x 240

256 x 144

854 x 480

1280 x 720

, , . , , .

iframe DOM :

<iframe id="youtube_iframe" type="text/html" width="100%" height="375" src="https://www.youtube.com/embed/FCuq3IedO9k?allowScriptAccess=always&controls=0&disablekb=1&enablejsapi=1&playsinline=1&iv_load_policy=3&modestbranding=1&start=151&rel=0&vq=large&showinfo=0&wmode=opaque&origin=http%3A%2F%2Fwww.meograph.com" frameborder="0"></iframe>

, , , , . ( , , ), , .

+4

All Articles