diff -r d09df952fd81 -r b3ccfdbd581b web/res/metadataplayer/LdtPlayer-core.js --- a/web/res/metadataplayer/LdtPlayer-core.js Tue Jun 26 19:14:44 2012 +0200 +++ b/web/res/metadataplayer/LdtPlayer-core.js Tue Jul 03 18:17:17 2012 +0200 @@ -151,6 +151,9 @@ } IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() { + + /* Getting video URL from metadata if it's not in the player config options */ + if (typeof this.videoData !== "undefined" && typeof this.config.player.video === "undefined") { var _media; @@ -186,7 +189,129 @@ } } - this.configurePopcorn(); + + if (typeof this.config.player.video === "string" && this.config.player.url_transform === "function") { + this.config.player.video = this.config.player.url_transform(this.config.player.video); + } + + var _pop, + _divs = this.layoutDivs("video",this.config.player.height || undefined), + containerDiv = _divs[0], + spacerDiv = _divs[1], + _this = this, + _types = { + "html5" : /\.(ogg|ogv|webm)$/, + "youtube" : /^(https?:\/\/)?(www\.)?youtube\.com/, + "dailymotion" : /^(https?:\/\/)?(www\.)?dailymotion\.com/ + }; + + if (this.config.player.type === "auto") { + this.config.player.type = "jwplayer"; + IriSP._(_types).each(function(_v, _k) { + if (_v.test(_this.config.player.video)) { + _this.config.player.type = _k + } + }); + } + + switch(this.config.player.type) { + case "html5": + var _tmpId = Popcorn.guid("video"), + _videoEl = IriSP.jQuery('