1
0
mirror of https://github.com/videojs/video.js.git synced 2025-09-16 09:26:56 +02:00

use {width: "auto", height: "auto"} to let css decide video dimensions

This commit is contained in:
Alex Vasilenko
2013-03-07 23:21:08 +02:00
committed by avasilenko
parent 9b52edea07
commit cf2fd9cbe8
2 changed files with 5 additions and 2 deletions

View File

@@ -72,6 +72,9 @@ vjs.options = {
'html5': {},
'flash': { swf: vjs.ACCESS_PROTOCOL + 'vjs.zencdn.net/c/video-js.swf' },
// Default of web browser is 300x150. Should rely on source width/height.
'width': 300,
'height': 150,
// defaultVolume: 0.85,
'defaultVolume': 0.00, // The freakin seaguls are driving me crazy!

View File

@@ -171,10 +171,10 @@ vjs.Player.prototype.createEl = function(){
// Make box use width/height of tag, or rely on default implementation
// Enforce with CSS since width/height attrs don't work on divs
if (this.options_['width']) {
if (this.options_['width'] !== 'auto') {
this.width(this.options_['width'], true); // (true) Skip resize listener on load
}
if (this.options_['height']) {
if (this.options_['height'] !== 'auto') {
this.height(this.options_['height'], true);
}