Video.js: Video Full Screen keeps video original size

Created on 29 Sep 2016  路  9Comments  路  Source: videojs/video.js

Most videos seem to be fine but others, such as this one:

http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4

Do not engage in full screen and simply stays in its original size with the rest of the screen having a black background. Video controls are properly positioned, but the actual video doesn't increase in size.

Most helpful comment

This CSS could help you.
It caused by the width / height into DOM attributes are the most important attributes. Forcing them into CSS to important has solved mine.

.video-js .vjs-tech {
  width: 100% !important;
  height: 100% !important;
}

All 9 comments

Seems to work fine for me. Can you put up a reduced test case showcasing the issue?

I am running into this using a Big Buck Bunny trailer test video, though I'm playing it with the contrib HLS extension. I will try to put up a test example soon.

screenshot from 2016-11-22 11-37-18

Those audio tracks errors are odd/suspicious. What version of video.js is that?

Also, is this browser or OS-specific?

Those audio tracks errors are odd/suspicious. What version of video.js is that?

Version 5.8.8, off the CDN. I'm also using v. 3.16.13 of the HLS library, if that might make a difference.

Also, is this browser or OS-specific?

Same results on both Firefox and Chromium on Linux, haven't tried another OS.

@bradjones1 I put together a reduced test case and fullscreen seems fine in all browsers, but I'm on Mac OS X. It could be Linux-related.

The audioTracks error looks like a consequence of incompatible video.js and videojs-contrib-hls versions. videojs-contrib-hls v3.16.x expects video.js v5.10.1 or higher.

My example uses v5.10.8 and v3.16.14 and I don't see that error.

@misteroneill Thanks... I missed the dependency issue since it's not in the README, just the package.js. I will try this combination and follow up. Appreciate the test.

Is the 4.x branch of HLS still unstable at this point?

After testing with this a bit more, I think the culprit here was width/height CSS being applied to the video element itself, which when removed allowed the video to expand to fit the full screen.

For anyone else finding this via a Drupal integration, see this issue.

This CSS could help you.
It caused by the width / height into DOM attributes are the most important attributes. Forcing them into CSS to important has solved mine.

.video-js .vjs-tech {
  width: 100% !important;
  height: 100% !important;
}

I think this has been fixed and answered, so, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cshah123 picture cshah123  路  4Comments

gfviegas picture gfviegas  路  3Comments

victorpfm picture victorpfm  路  4Comments

TheKassaK picture TheKassaK  路  3Comments

kitsunde picture kitsunde  路  4Comments