Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player not showing only with Android/Chrome and 3G/4G connections #3606

Closed
Joan-Rojo1 opened this issue Sep 8, 2016 · 7 comments
Closed
Labels
needs: confirmation needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example

Comments

@Joan-Rojo1
Copy link

Hi there,

I am facing an extremely rare issue. The player is not being displayed when using Android/Chrome and 3G/4G connections, with Wifi everything is ok. I have tried to debug it, but I am not getting any message on console. Here it is an example URL:

http://prem.publico.es/publicotv/577486/la-ola-de-incendios-en-galicia-hace-sospechar-que-son-intencionados

I dont know if any has faced this problem, but every help would be appreciated.

Thanks in advance,

Note: we use video.js 5.9.2 we use plugins for ads such as video.ima.js and video.ads.js, for example.

@mister-ben
Copy link
Contributor

Can you reduce that down to a minimal test case?

@Joan-Rojo1
Copy link
Author

Hi Ben,

Even you don't have to use your cell and mobile data to reproduce it. It's enough to use Chrome with developer tools and set throttling to any XG connection vs Wifi to see the difference. I can't find any difference in DOM. Here are 2 captures reproducing the problem:

http://oi66.tinypic.com/2wgf8n6.jpg

http://oi68.tinypic.com/apgzg6.jpg

Thanks a lot for answering,

@misteroneill
Copy link
Member

I tried all the way down to "Good 2G" and I saw a video player to appear and playback start. Granted, I had to wait almost 2 minutes for the ~700 requests and 5MB of data to finish. 😆

The reason Ben asked about a reduced test case is that without one there is simply too much going on here to narrow a problem down to video.js specifically. There are too many factors at play that could be affecting your player to say that there's a bug in video.js.

@misteroneill misteroneill added needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example needs: confirmation labels Sep 8, 2016
@brandonocasey
Copy link
Contributor

here is the starter template for generating a reduced test case http://jsbin.com/axedog/edit?html,output

@Joan-Rojo1
Copy link
Author

Hi there, thanks a lot for your time and test. I will prepare a minimal test as you suggest and let you know next week. Have a nice weekend :)

@mister-ben
Copy link
Contributor

I believe the issue here is using fluid mode with preload disabled, when no other size information is available. The aspect ratio can't be detected and the intended default 16:9 isn't being used.

You're seeing this only on cellular because the browser forces preload to none on a cellular connection, but allows preload on wifi.

I think I have a fix, but you can work around it in the meantime by setting a width on the player, e.g. width="100%" or including an aspect ratio in the settings {"aspectRatio": "16:9"}.

@Joan-Rojo1
Copy link
Author

Hi Ben,

This morning I've been testing in that way and I was getting that if I set width and height explicitly in the video tag the player was being showed, but I was losing responsiveness.

You are right, in Android+mobile data+Chrome last versions the preload feature acts like set to none and the player doesn't know his aspect ratio. I have added in the settings {"aspectRatio": "16:9"} as you suggested and It's working now keeping responsiveness ok. You can see it in the URL that I posted first.

This is something that must be took into account and I didn't find any info about it on web.

Thanks a lot for your support and time. I hope this to be useful for others in the future,
Best

gkatsev pushed a commit that referenced this issue Nov 3, 2016
…own (#3614)

If a player is fluid and does not have a width set, and preload is set to none, the height of the player is zero. This includes where preload is forced to none by mobile Chrome as in #3606.

* If the player has the .vjs-fluid class when initialised, fluid is set to true, so adding the class behaves the same as {fluid: true} in the setup options.
* The fluid(bool) setter calls player.updateStyleEl_(). Otherwise it won't be triggered in createEl() if an aspect ratio is not also set.
* Corrects the test for a set videoWidth() in updateStyleEl_() - videoWidth() returns 0 if the width is unknown. This allows the default 16:9 to kick in rather than using 0:0.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: confirmation needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example
Projects
None yet
Development

No branches or pull requests

4 participants