player.js
player.js copied to clipboard
Under load, seeing "There was an error fetching the embed code from Vimeo" errors from player
Expected Behavior
I am hosting webinar videos which attendees join at roughly the same time. There are cases where 200 or 300 attendees start to watch the same video at roughly the same time. At least within a few minutes of each other. Of course, the expectation is that all attendees can load the video successfully.
Actual Behavior
In these cases - under load - a handful see the error fetching embed code from Vimeo error.
Note the code that below that surfaces the actual error code I think is wrong and so only the message above is available. I imagine what was wanted was .concat(xhr.status, '.')
not status.
xhr.onerror = function () {
--
| var status = xhr.status ? " (".concat(xhr.status, ")") : '';
| reject(new Error("There was an error fetching the embed code from Vimeo".concat(status, ".")));
| };
|
| xhr.send();
Steps to Reproduce
Tough one - this really only happens under load. I can bring up all the data I have in bugsnag on this if you think you could correlate to your logs. Here's one image of that:

@daviddfm thanks for reporting. This is under investigation by our API team. There is indeed a certain limit on the oEmbed endpoint which with the numbers you reported 200/300 new viewers per minute it will get maxed out.
While this is being reviewed there is a workaround you can implement right now. That is not relying on the oEmbed API to get the iframe embed code. It's explained here: https://github.com/vimeo/player.js#pre-existing-player
Personally I would always use this method as it doesn't require an extra request to get the iframe embed which doesn't change much anyway, plus you have more control over all the attributes on the iframe.
We are facing the same issue for users in USA, it seems in peak hours it kinda doesnt work not able to reproduce also
@kasvith If possible, I would recommend following the approach that Wesley shared above for generating the embed code.