vimeo / player.js

Interact with and control an embedded Vimeo Player.
https://player.vimeo.com/api/demo
MIT License
1.44k stars 262 forks source link

Vimeo Player Stuck Loading #842

Closed Hanley1 closed 2 years ago

Hanley1 commented 2 years ago

Expected Behavior

Video plays

Actual Behavior

Video gets stuck in loading process, showing endless circle animation

Steps to Reproduce

I have a user reporting this issue when they try to load videos on our site.

Example: Go to www.audiblegenius.com/course/bb1/section_1/drums_1/earned, hit the play button.

We cannot recreate it on our end. He's experiencing it only with Firefox and Brave, Chrome works fine. And he's getting an error in the console. See screenshot:

Screenshot

giacomelli commented 2 years ago

Same here!

We have reports from our users with the same problem behavior, most of the reports are about Chrome.

I've tested it on my Windows machine and Chrome (103.0.5060.53) and it's happening with some videos: image

giacomelli commented 2 years ago

From the messages is pretty clear that is something related to Google QUIC protocol.

When I disabled it on Chrome, the error stopped: image

rkrishnan8594 commented 2 years ago

Thanks @giacomelli for providing a solution for this issue. We're aware of this as well and will investigate whether there are any ways to avoid this issue without changing Chrome settings.

DiegoPiloni commented 2 years ago

Thanks a lot @giacomelli !! We were having several user reports because of this and your solution seems to be working for all of them

Hanley1 commented 2 years ago

Thanks @giacomelli

This takes care of Brave as well since it's built with Chromium.

As for Firefox apparently they rolled out QUIC protocol in a recent update. It can be disabled by disabling http3: https://securityboulevard.com/2022/01/easy-firefox-fix-of-the-day-disable-http3/

Hanley1 commented 2 years ago

Well I take it back about Firefox. After disabling http3 my user is still experiencing this issue. Any ideas on how to prevent the error in Firefox?

dario-santandrea commented 2 years ago

Hi! Any update about this issue? I have a lot of angry customers because their videos won't play. Thanks!

dario-santandrea commented 2 years ago

In case anyone is interested.

We solved the problem using direct links to videos (https://vimeo.zendesk.com/hc/es/articles/224823567-Direct-links-to-video-files) via the vimeo API and loaded the video with the Plyr.io player (https://plyr.io/)

So far we have had no complaints from our customers 😄

rkrishnan8594 commented 2 years ago

Providing a followup to this issue - we've confirmed with one of our CDN partners that this error on video segment requests was caused by a recent Chrome update. We'll be in close communication with them about an expected resolution timeline (the fix for this will very likely not be on the Vimeo side).

In the interim, our recommendation is for users to switch browsers if they're encountering this issue.

rkrishnan8594 commented 2 years ago

We've confirmed with our CDN partner that this issue is now resolved.

alexeevit commented 1 year ago

I ran into this issue the other day again. In my case it's not related to the QUIC protocol (no errors in console and I disabled the flag in chrome). I implemented autoplay for modal windows — once the modal window is displayed (removed display: none), I initialize the player, wait until it's ready and play:

$('[data-name=demo-video]').on('showed', function(event) {
    var videoPlayer = new Vimeo.Player('demo-player');
    videoPlayer.ready().then(function() { videoPlayer.play(); });
});

$('[data-name=demo-video]').on('hidden', function(event) {
    var videoPlayer = new Vimeo.Player('demo-player');
    videoPlayer.ready().then(function() { videoPlayer.pause(); });
});

So sometimes (like every 10 time) it's playing the video but still displaying the loading spinner. Looks like some kind of race condition.

I tried to replace .ready() with .on('loaded') and it started appearing even more often.

What's interesting, I cannot reproduce it if I use adblock.

rkrishnan8594 commented 1 year ago

@alexeevit Thanks for the report. This sounds like a different issue than the one reported in this thread. Do you mind filing a new issue for this and including a JSFiddle or CodePen that we can use for reproduction?

alexeevit commented 1 year ago

@rkrishnan8594 Unfortunately, I cannot reproduce it in a clean environment. It seems that it conflicts with something on my website. Don't event know where to start, probably I should turn off all the external scripts and start connecting them 1 by 1.

yrletter commented 1 year ago

Similar issue:

https://native-2e3564-bdcdb6ca2f13f1fa287c207f4.webflow.io/directors/clara-aranovich-valdes

I have an ongoing issue in Webflow where the Vimeo loading spinner keeps appearing over videos that are autoplaying. It's hard to pinpoint as it only happens intermittently. Try clicking "play" on a few videos, usually it happens after a few. I have written custom js that keeps track of the vimeo videos and modal windows. Any ideas for how to troubleshoot?

alexeevit commented 1 year ago

Gotta say that in my case I use webflow as well

I ran into this issue the other day again. In my case it's not related to the QUIC protocol (no errors in console and I disabled the flag in chrome). I implemented autoplay for modal windows — once the modal window is displayed (removed display: none), I initialize the player, wait until it's ready and play:

$('[data-name=demo-video]').on('showed', function(event) {
    var videoPlayer = new Vimeo.Player('demo-player');
    videoPlayer.ready().then(function() { videoPlayer.play(); });
});

$('[data-name=demo-video]').on('hidden', function(event) {
    var videoPlayer = new Vimeo.Player('demo-player');
    videoPlayer.ready().then(function() { videoPlayer.pause(); });
});

So sometimes (like every 10 time) it's playing the video but still displaying the loading spinner. Looks like some kind of race condition.

I tried to replace .ready() with .on('loaded') and it started appearing even more often.

What's interesting, I cannot reproduce it if I use adblock.

toddpadwick commented 1 year ago

Hi @rkrishnan8594 . Unfortunately, we still seem to be experiencing this issue on, the latest Chrome release as of 17th July 2023: Version 114.0.5735.198 (Official Build) (x86_64). We are running vimeo/player 2.20.1.

Screenshot 2023-07-17 at 12 24 46 (2)

rkrishnan8594 commented 1 year ago

@toddpadwick Are you seeing an ERR_QUIC_PROTOCOL_ERR in your console logs? If not, please file as a separate issue. And if it doesn't appear to be an issue with the Player.js SDK, please report this as an issue to Vimeo Support.

rodox12 commented 1 year ago

This issue isn't solved yet, it happens randomly for me... and nothing wrong shows in the console... The Video keeps playing below the loading layer...

PS: already tried to disable the QUIC Protocol...

Screenshot from 2023-08-15 10-08-05

brandonhrowe commented 1 year ago

@rodox12 Per the note above, please report this as a separate issue to Vimeo Support as this sounds different than the QUIC issue.