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:
committed by
avasilenko
parent
9b52edea07
commit
cf2fd9cbe8
@@ -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!
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user