diff -r 2aa7fdb0762a -r ee11ed1b739e src/js/init.js --- a/src/js/init.js Mon Sep 17 22:44:59 2012 +0900 +++ b/src/js/init.js Tue Sep 18 15:39:28 2012 +0900 @@ -82,7 +82,6 @@ IriSP.loadCss(IriSP.getLib("cssjQueryUI")); IriSP.loadCss(this.config.css); -// this.videoData = this.loadMetadata(this.config.player.metadata); this.$ = IriSP.jQuery('#' + this.config.container); this.$.css({ "width": this.config.width, @@ -100,11 +99,6 @@ }); }; this.$.find('.Ldt-Loader').detach(); -/* - this.videoData.onLoad(function() { - _this.onVideoDataLoaded(); - }); -*/ } IriSP.Metadataplayer.prototype.loadMetadata = function(_metadataInfo) { @@ -121,197 +115,6 @@ } } -// TODO: REMOVE ! -IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() { - - /* Setting default media from metadata */ - - if (typeof this.videoData !== "undefined") { - - var _media; - - if (typeof this.videoData.mainMedia !== "undefined") { - _media = this.videoData.getElement(this.videoData.mainMedia); - } - - if (this.config.player.type === "mashup" || this.config.player.type === "mashup-html") { - if (typeof _media === "undefined" || _media.elementType !== "mashup") { - var _mashups = this.videoData.getMashups(); - if (_mashups.length) { - _media = _mashups[0]; - } - } - } else { - if (typeof _media === "undefined" || _media.elementType !== "media") { - var _medias = this.videoData.getMedias(); - if (_medias.length) { - _media = _medias[0]; - } - } - } - - this.videoData.currentMedia = _media; - - /* Getting video URL from metadata if it's not in the player config options */ - - if (typeof _media !== "undefined" && typeof _media.video !== "undefined" && typeof this.config.player.video === "undefined") { - this.config.player.video = _media.video; - if (typeof this.config.player.streamer == "undefined" && typeof _media.streamer !== "undefined") { - this.config.player.streamer = _media.streamer; - } - } - - } - - 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/, - "vimeo" : /^(https?:\/\/)?(www\.)?vimeo\.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('