diff -r 69ac9ee00ec1 -r cbb1425bc769 src/js/site.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/js/site.js Fri Sep 09 15:13:06 2011 +0200
@@ -0,0 +1,203 @@
+/* site.js - all our site-dependent config : player chrome, cdn locations, etc...*/
+
+IriSP.lib = {
+ jQuery:"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js",
+ jQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js",
+ jQueryToolTip:"http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js",
+ swfObject:"http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",
+ cssjQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css"
+};
+
+//Player Configuration
+IriSP.config = undefined;
+IriSP.configDefault = {
+ metadata:{
+ format:'cinelab',
+ src:'',
+ load:'jsonp'
+ },
+ gui:{
+ width:650,
+ height:0,
+ mode:'radio',
+ container:'LdtPlayer',
+ debug:false,
+ css:'../src/css/LdtPlayer.css'
+ },
+ player:{
+ type:'jwplayer',
+ src:'../res/swf/player.swf',
+ params:{
+ allowfullscreen:"true",
+ allowscriptaccess:"always",
+ wmode:"transparent"
+ },
+ flashvars:{
+ streamer:"streamer",
+ file:"file",
+ live:"true",
+ autostart:"false",
+ controlbar:"none",
+ playerready:"IriSP.playerReady"
+ },
+ attributes:{
+ id:"Ldtplayer1",
+ name:"Ldtplayer1"
+ }
+ },
+ module:null
+};
+
+//Player Variable
+/* FIXME: use an sharing library */
+IriSP.LdtShareTool = ""+
+"\n "+
+"\n "+
+"\n "+
+"\n ";
+
+/* FIXME: move the function out of this file to ui.js*/
+IriSP.createPlayerChrome = function(){
+ var width = IriSP.config.gui.width;
+ var height = IriSP.config.gui.height;
+ var heightS = IriSP.config.gui.height-20;
+
+ // AUDIO */
+ // PB dans le html : ;
+ IriSP.trace( "__IriSP.createMyHtml",IriSP.config.gui.container );
+
+
+ /* FIXME : factor this in another file */
+ if( IriSP.config.gui.mode=="radio" ){
+
+ IriSP.jQuery( "#"+IriSP.config.gui.container ).before(
+ "
\n"+
+ " ");
+ IriSP.trace("__IriSP.createHtml",IriSP.config.gui.container);
+
+ IriSP.jQuery( "\n"+
+ "
\n"+
+ "
Get flash to see this player \n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ " \n"+
+ " \n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ " \n"+
+ " \n"+
+ "
\n"+
+ "
 \;
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ " \n"+
+ " "+IriSP.LdtShareTool+"\n"+
+ " \n"+
+ "
\n"+
+ "
"+
+ "
"+
+ //"
Mots clefs :
"+
+ "
"+
+ "
").appendTo("#"+IriSP.config.gui.container);
+ // special tricks IE 7
+ if (IriSP.jQuery.browser.msie==true && IriSP.jQuery.browser.version=="7.0"){
+ //LdtSearchContainer
+ //__IriSP.jQuery("#LdtPlayer").attr("margin-top","50px");
+ IriSP.jQuery("#Ldt-Root").css("padding-top","25px");
+ IriSP.trace("__IriSP.createHtml","IE7 SPECIAL ");
+ }
+ } else if(IriSP.config.gui.mode=="video") {
+
+ IriSP.jQuery( "
\n"+
+ "
\n"+
+ "
\n"+
+ "
Get flash to see this player \n"+
+ "
\n"+
+
+ "
\n"+
+ "
\n"+
+ " \n"+
+ " \n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ " \n"+
+ " \n"+
+ "
\n"+
+ "
 \;
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ "
\n"+
+ " \n"+
+ " "+IriSP.LdtShareTool+"\n"+
+ " \n"+
+ "
\n"+
+ "
"+
+ "
"+
+ //"
Mots clefs :
"+
+ "
"+
+ "
").appendTo("#"+IriSP.config.gui.container);
+
+ }
+
+
+ IriSP.trace("__IriSP.createHtml",IriSP.jQuery.browser.msie+" "+IriSP.jQuery.browser.version);
+ IriSP.trace("__IriSP.createHtml","end");
+ IriSP.jQuery("#Ldt-Annotations").width(width-(75*2));
+ IriSP.jQuery("#Ldt-Show-Arrow-container").width(width-(75*2));
+ IriSP.jQuery("#Ldt-ShowAnnotation-audio").width(width-10);
+ IriSP.jQuery("#Ldt-ShowAnnotation-video").width(width-10);
+ IriSP.jQuery("#Ldt-SaKeyword").width(width-10);
+ IriSP.jQuery("#Ldt-controler").width(width-10);
+ IriSP.jQuery("#Ldt-Control").attr("z-index","100");
+ IriSP.jQuery("#Ldt-controler").hide();
+
+ IriSP.jQuery("
").appendTo("#Ldt-ShowAnnotation-audio");
+
+ if(IriSP.config.gui.mode=='radio'){
+ IriSP.jQuery("#Ldt-load-container").attr("width",IriSP.config.gui.width);
+ }
+ // Show or not the output
+ if(IriSP.config.gui.debug===true){
+ IriSP.jQuery("#Ldt-output").show();
+ } else {
+ IriSP.jQuery("#Ldt-output").hide();
+ }
+
+};
+