The embedded player shows "Please click here to watch this video on YouTube" to some users under unclearly circumstances
Asked Answered
C

2

8

We use the YouTube embedded player on a hybrid app based on Cordova. The app has a lot of traffic worldwide.

The player displays the message "Please click here to watch this video on YouTube" to some users when they try to play any video under unclearly circumstances.

We do not see a clear pattern, it doesn't seem to depend on the user's country nor the restrictions of the video.

We have seen in the player code (https://www.youtube.com/yts/jsbin/player_ias-vflrnurMS/en_US/base.js) that the message is assigned to a constant called "TOO_MANY_REQUESTS_WITH_LINK" but there is no high volume of requests per user and the quota cannot be configured as in other Google APIs.

We follow the iFrame API reference: https://developers.google.com/youtube/iframe_api_reference?hl=en

<iframe id="player" src="https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&amp;cc_load_policy=0&amp;controls=0&amp;disablekb=1&amp;enablejsapi=1&amp;fs=0&amp;iv_load_policy=3&amp;loop=0&amp;modestbranding=1&amp;playsinline=1&amp;rel=0&amp;showinfo=0&amp;wmode=transparent&amp;origin=XXX" frameborder="0"></iframe>

<script type="text/javascript">
    var player,
        scriptTag = document.createElement('script'),
        firstScriptTag = document.getElementsByTagName('script')[0];
    scriptTag.src = "https://www.youtube.com/iframe_api";
    firstScriptTag.parentNode.insertBefore(scriptTag, firstScriptTag);
    function onYouTubeIframeAPIReady() {
        var options = JSON.parse('{"autoplay":1,"cc_load_policy":0,"controls":0,"disablekb":1,"enablejsapi":1,"fs":0,"iv_load_policy":3,"loop":0,"modestbranding":1,"playsinline":1,"rel":0,"showinfo":0,"wmode":"transparent","origin":"XXX"}');
        if (!options.origin) {
            options.origin = location.origin ||
            location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
        }
        player = new YTRemoteVPlayer('player', '<%-videoId%>', options);
    }
</script>

Does anyone know what may be happening and how to fix it?

Cognate answered 22/10, 2019 at 10:42 Comment(7)
I am having the same issue on one Android app that uses the iFrame API. This bug started to happen on 19th of October. As you have said, I also could not figure out any pattern for this bug to happen, but it is reflecting in a lot of 1 stars. Searching on YouTube / Chromium forums, I could not find any answers / fixes =/Zeeland
Teran, could you check and post here if the quantity of bad reviews related to that problem have reduced (or even zeroed) from yesterday to today? It seems like YouTube has resolved that problem. Thank you :)Zeeland
Indeed, since yesterday we haven't got any error about this. Thanks for your help!Cognate
Awesome :tada: :)Zeeland
It's happening again :(Cognate
I've opened a new issue on issuetracker: issuetracker.google.com/issues/144057800Zeeland
Ok Augusto, well done!Cognate
Z
12

Me and my teammates managed to reproduce that behaviour locally.

To reproduce that behaviour, all you need to do is, under the same IP Address, to load the youtube JS multiple times and for different videos. Although I cannot clarify the exact amount of times it must be done (we left some devices aside doing it), the behavior certainly happened.

As an attempt of a workaround for that problem, we accessed the https://web.archive.org/web website and fetched an old YouTube JS script (https://www.youtube.com/iframe_api). We tried to use that old script, but with no success. The message continued to appear =/.

I really do not know if there is much we, developers, can do about it, but wait for an YouTube statement and/or revision of recent changes on their end.


Update

There is an issue opened on Google's issue tracker website:


Update

It looks like that YouTube have resolved that problem on their end. We'll keep monitoring :)


Update (November 5th 2019)

The problem is happening again.


Update (November 7th 2019)

I have opened a new issue on issuetracker: - https://issuetracker.google.com/issues/144057800

Zeeland answered 30/10, 2019 at 16:32 Comment(2)
It's happening again :(Cognate
@angel.teran, I can confirm that the problem is happening again to us and other apps too =; /Zeeland
S
3

I don't have a fix for it, but I can add more information about the problem, this way maybe someone can help us with this issue.

I am getting the same error with some users, and like you said there is no a clear pattern. My devices are working properly, but I did some tests with the help of a user of my app that is getting this error. Following the results:

Demo used in my tests: https://developers.google.com/youtube/youtube_player_demo

Test 1 - Open the iframe player api demo on device's browser - WORKED

Test 2 - Open the iframe player api demo into a webview on my app - FAIL

Test 3 - Open the iframe player api demo into a webview on my app using a VPN connection - WORKED

So, it appears to be a combination of APP + IP is blocked. I don't know the reason, and it will be very helpful if someone repeat these tests. I am trying to confirm it with another user, but it's a little hard to find someone willing to help.

UPDATE: a second user tried to use a VPN and it worked to him too.

UPDATE 2: a user with this problem told me that the videos are working properly again now. It appears to be a temporary block by Youtube on server side.

Songer answered 26/10, 2019 at 12:35 Comment(6)
Glad to see that your contribution is back, @AllanBueno \o/. Thank you very much for all the info you've provided :DZeeland
haha yeah! I had removed my reply because yours was more helpful :) Anyway I brought it back, because it can help someone if the problem occurs again. Thanks for all information, it helped a lot!Songer
The problem is back :(Cognate
It's true. The problem is back in my app too =/Songer
I've opened a new issue on issuetracker: issuetracker.google.com/issues/144057800Zeeland
@AugustoCarmo I think the guys from Google on the issue tracker will not fix the problem. I had another problems with Youtube in the past, and unfortunately some of them were not fixed because it is very hard to do they understand that this is a critical problem to us and the users.Songer

© 2022 - 2024 — McMap. All rights reserved.