1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-10 11:10:19 +02:00

do not force default 300x150 if no width/height found

This commit is contained in:
Alex Vasilenko 2013-03-05 18:35:55 +02:00
parent 29297bd37b
commit 9b52edea07
2 changed files with 7 additions and 7 deletions

View File

@ -72,10 +72,6 @@ vjs.options = {
'html5': {}, 'html5': {},
'flash': { swf: vjs.ACCESS_PROTOCOL + 'vjs.zencdn.net/c/video-js.swf' }, '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.85,
'defaultVolume': 0.00, // The freakin seaguls are driving me crazy! 'defaultVolume': 0.00, // The freakin seaguls are driving me crazy!

View File

@ -169,10 +169,14 @@ vjs.Player.prototype.createEl = function(){
// Default state of video is paused // Default state of video is paused
this.addClass('vjs-paused'); this.addClass('vjs-paused');
// Make box use width/height of tag, or default 300x150 // Make box use width/height of tag, or rely on default implementation
// Enforce with CSS since width/height attrs don't work on divs // Enforce with CSS since width/height attrs don't work on divs
if (this.options_['width']) {
this.width(this.options_['width'], true); // (true) Skip resize listener on load this.width(this.options_['width'], true); // (true) Skip resize listener on load
}
if (this.options_['height']) {
this.height(this.options_['height'], true); this.height(this.options_['height'], true);
}
// Wrap video tag in div (el/box) container // Wrap video tag in div (el/box) container
if (tag.parentNode) { if (tag.parentNode) {