diff -r 0df13ef0a63c -r b694a7a67500 web/static/js/LdtPlayer.js --- a/web/static/js/LdtPlayer.js Mon Jun 14 10:03:42 2010 +0200 +++ b/web/static/js/LdtPlayer.js Mon Jun 14 11:18:22 2010 +0200 @@ -146,14 +146,15 @@ if (tmp) { tmp.innerHTML = "volume: " + currentVolume; } } - function createPlayer(width,height,url) { + function createPlayer(width,height,url,duration,streamerPath,MySwfPath) { myUrlFragment = url.split("/"); // file = myUrlFragment[myUrlFragment.length-3]+"/"+myUrlFragment[myUrlFragment.length-2]+"/"+myUrlFragment[myUrlFragment.length-1]; indexofff = url.lastIndexOf(file); - streamer = url.substr(0,indexofff); - alert(url+"="+streamer+" - "+file); + streamer = streamerPath; + //alert(" StreamerPath : "+streamer+" - "+file); + //alert(" SwfPath : "+MySwfPath); var flashvars = { streamer:streamer, @@ -174,7 +175,7 @@ name:"Ldtplayer1" } - swfobject.embedSWF("swf/player.swf", "ldtPlaceHolder", width, height, "9.0.115", false, flashvars, params, attributes); + swfobject.embedSWF(MySwfPath, "ldtPlaceHolder", width, height, "9.0.115", false, flashvars, params, attributes); } @@ -194,7 +195,7 @@ var playerLdtWidth; var playerLdtHeight; - function loadJson (width,height,urlJson){ + function loadJson (width,height,urlJson,MySwfPath){ playerLdtWidth=width; playerLdtHeight=height; @@ -215,7 +216,8 @@ //}); $jIRI("
").appendTo("#output"); MyMedia = new Media(json.medias[0].id,json.medias[0].href,json.medias[0]["meta"]["dc:duration"],json.medias[0]['dc:title'],json.medias[0]['dc:description']); - MyMedia.createPlayer(playerLdtWidth,playerLdtHeight); + //alert(" MySwfPath : "+MySwfPath); + MyMedia.createPlayer(playerLdtWidth,playerLdtHeight,json.medias[0]["meta"]["item"]["value"],MySwfPath); //alert("success loading ! "+json.medias[0]["meta"]["dc:duration"]+ " | " +json.medias[0]["meta"]["item"]["value"]); /* # créer lignes */ @@ -272,13 +274,10 @@ INIT player LDT */ - function playerLdt (width,height,file,divId){ - - //$jIRI("#playerLdt").append("