diff -r 9859c4bae904 -r f9d51dd4a3fe src/widgets/HtmlPlayer.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/widgets/HtmlPlayer.js Wed Dec 19 19:02:52 2012 +0100 @@ -0,0 +1,136 @@ +IriSP.Widgets.HtmlPlayer = function(player, config) { + IriSP.Widgets.Widget.call(this, player, config); +}; + +IriSP.Widgets.HtmlPlayer.prototype = new IriSP.Widgets.Widget(); + + +IriSP.Widgets.HtmlPlayer.prototype.defaults = { + aspect_ratio: 14/9 +} + +IriSP.Widgets.HtmlPlayer.prototype.draw = function() { + + + if (typeof this.video === "undefined") { + this.video = this.media.video; + } + + if (this.url_transform) { + this.video = this.url_transform(this.video); + } + + if (!this.height) { + this.height = Math.floor(this.width/this.aspect_ratio); + this.$.css({ + height: this.height + }); + } + + var videoEl = IriSP.jQuery('