sbin/build/LdtPlayer-release.js
author hamidouk
Thu, 08 Sep 2011 13:54:17 +0200
changeset 20 0238d2e3a15e
permissions -rw-r--r--
Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     1
/* 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     2
 * 	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     3
 *	Copyright 2010 Institut de recherche et d'innovation 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     4
 *	contributor(s) : Samuel Huron 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     5
 *	Use Silvia Pfeiffer 's javascript mediafragment implementation
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     6
 *
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     7
 *	contact@iri.centrepompidou.fr
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     8
 *	http://www.iri.centrepompidou.fr 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
     9
 *	 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    10
 *	This software is a computer program whose purpose is to show and add annotations on a video .
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    11
 *	This software is governed by the CeCILL-C license under French law and
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    12
 *	abiding by the rules of distribution of free software. You can  use, 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    13
 *	modify and/ or redistribute the software under the terms of the CeCILL-C
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    14
 *	license as circulated by CEA, CNRS and INRIA at the following URL
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    15
 *	"http://www.cecill.info". 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    16
 *	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    17
 *	The fact that you are presently reading this means that you have had
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    18
 *	knowledge of the CeCILL-C license and that you accept its terms.
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    19
*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    20
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    21
if ( window.IriSP === undefined && window.__IriSP === undefined ) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    22
	var IriSP ={}; 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    23
	var __IriSP = IriSP; /* for backward compatibility */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    24
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    25
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    26
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    27
/* CLASS TRACE */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    28
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    29
IriSP.traceNum=0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    30
IriSP.trace = function(msg,value){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    31
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    32
	if(IriSP.config.gui.debug===true){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    33
		IriSP.traceNum += 1;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    34
		IriSP.jQuery("<div>"+IriSP.traceNum+" - "+msg+" : "+value+"</div>").appendTo("#Ldt-output");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    35
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    36
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    37
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    38
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    39
// Player Configuration 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    40
IriSP.config = undefined;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    41
IriSP.configDefault = {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    42
		metadata:{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    43
			format:'cinelab',
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    44
			src:'',
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    45
			load:'jsonp'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    46
		},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    47
		gui:{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    48
			width:650,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    49
			height:0,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    50
			mode:'radio',
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    51
			container:'LdtPlayer',
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    52
			debug:false, 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    53
			css:'../src/css/LdtPlayer.css'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    54
		},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    55
		player:{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    56
			type:'jwplayer',
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    57
			src:'../res/swf/player.swf',
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    58
			params:{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    59
				allowfullscreen:"true", 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    60
				allowscriptaccess:"always",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    61
				wmode:"transparent"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    62
			},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    63
			flashvars:{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    64
				streamer:"streamer",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    65
				file:"file", 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    66
				live:"true",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    67
				autostart:"false",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    68
				controlbar:"none",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    69
				playerready:"__IriSP.playerReady"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    70
			},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    71
			attributes:{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    72
				id:"Ldtplayer1",  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    73
				name:"Ldtplayer1"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    74
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    75
		},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    76
		module:null
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    77
	};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    78
IriSP.lib = {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    79
			jQuery:"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    80
			jQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    81
			jQueryToolTip:"http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    82
			swfObject:"http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    83
			cssjQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    84
		};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    85
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    86
// Player Variable
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    87
IriSP.LdtShareTool = ""+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    88
"\n<a onclick=\"__IriSP.MyApiPlayer.share('delicious');\" title='partager avec delicious'><span class='share shareDelicious'>&nbsp;</span></a>"+		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    89
"\n<a onclick=\"__IriSP.MyApiPlayer.share('facebook');\" title='partager avec facebook'> <span class='share shareFacebook'>&nbsp;</span></a>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    90
"\n<a onclick=\"__IriSP.MyApiPlayer.share('twitter');\" title='partager avec twitter'>  <span class='share shareTwitter'>&nbsp;</span></a>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    91
"\n<a onclick=\"__IriSP.MyApiPlayer.share('myspace');\" title='partager avec Myspace'>  <span class='share shareMySpace'>&nbsp;</span></a>";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    92
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    93
// Official instance - to refactor ?
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    94
IriSP.MyLdt 		= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    95
IriSP.MyTags 		= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    96
IriSP.MyApiPlayer	= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    97
IriSP.player		= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    98
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
    99
// genral var (old code) - to refactor 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   100
IriSP.Durration		= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   101
IriSP.playerLdtWidth	= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   102
IriSP.playerLdtHeight	= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   103
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   104
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   105
 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   106
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   107
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   108
IriSP.init = function (config){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   109
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   110
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   111
		if(config === null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   112
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   113
			IriSP.config 			 = IriSP.configDefault;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   114
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   115
		} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   116
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   117
			IriSP.config 			 = config;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   118
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   119
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   120
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   121
			if (IriSP.config.player.params == null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   122
			IriSP.config.player.params = IriSP.configDefault.player.params;}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   123
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   124
			if (IriSP.config.player.flashvars == null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   125
			IriSP.config.player.flashvars = IriSP.configDefault.player.flashvars;}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   126
			if (IriSP.config.player.attributes == null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   127
			IriSP.config.player.attributes = IriSP.configDefault.player.attributes;}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   128
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   129
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   130
		var metadataSrc 		 = IriSP.config.metadata.src;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   131
		var guiContainer		 = IriSP.config.gui.container;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   132
		var guiMode				 = IriSP.config.gui.mode;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   133
		var guiLdtShareTool		 = IriSP.LdtShareTool;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   134
		// Localize jQuery variable
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   135
		IriSP.jQuery = null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   136
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   137
		/******** Load jQuery if not present *********/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   138
		if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.4.2') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   139
			var script_tag = document.createElement('script');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   140
			script_tag.setAttribute("type","text/javascript");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   141
			script_tag.setAttribute("src",IriSP.lib.jQuery);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   142
				//"http://cdn.jquerytools.org/1.2.4/full/jquery.tools.min.js");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   143
			script_tag.onload = scriptLibHandler;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   144
			script_tag.onreadystatechange = function () { // Same thing but for IE
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   145
				if (this.readyState == 'complete' || this.readyState == 'loaded') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   146
					scriptLibHandler();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   147
					
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   148
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   149
			};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   150
			// Try to find the head, otherwise default to the documentElement
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   151
			(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   152
		} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   153
			// The jQuery version on the window is the one we want to use
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   154
			 IriSP.jQuery = window.jQuery;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   155
			scriptLibHandler();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   156
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   157
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   158
		/******** Called once jQuery has loaded ******/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   159
		function scriptLibHandler() {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   160
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   161
			var script_jqUi_tooltip = document.createElement('script');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   162
			script_jqUi_tooltip.setAttribute("type","text/javascript");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   163
			script_jqUi_tooltip.setAttribute("src",IriSP.lib.jQueryToolTip);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   164
			script_jqUi_tooltip.onload = scriptLoadHandler;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   165
			script_jqUi_tooltip.onreadystatechange = function () { // Same thing but for IE
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   166
				if (this.readyState == 'complete' || this.readyState == 'loaded') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   167
					scriptLoadHandler("jquery.tools.min.js loded");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   168
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   169
			};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   170
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   171
			var script_swfObj = document.createElement('script');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   172
			script_swfObj.setAttribute("type","text/javascript");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   173
			script_swfObj.setAttribute("src",IriSP.lib.swfObject);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   174
			script_swfObj.onload = scriptLoadHandler;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   175
			script_swfObj.onreadystatechange = function () { // Same thing but for IE
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   176
				if (this.readyState == 'complete' || this.readyState == 'loaded') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   177
					scriptLoadHandler("swfobject.js loded");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   178
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   179
			};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   180
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   181
			var script_jqUi = document.createElement('script');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   182
			script_jqUi.setAttribute("type","text/javascript");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   183
			script_jqUi.setAttribute("src",IriSP.lib.jQueryUI);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   184
			script_jqUi.onload = scriptLoadHandler;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   185
			script_jqUi.onreadystatechange = function () { // Same thing but for IE
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   186
				if (this.readyState == 'complete' || this.readyState == 'loaded') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   187
					scriptLoadHandler("jquery-ui.min.js loded");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   188
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   189
			};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   190
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   191
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   192
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   193
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   194
			(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_jqUi_tooltip);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   195
			(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_jqUi);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   196
			(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_swfObj);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   197
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   198
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   199
		};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   200
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   201
		/******** Called once all lib are loaded ******/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   202
		var loadLib = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   203
		function scriptLoadHandler(Mylib) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   204
			//alert(Mylib);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   205
			loadLib +=1;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   206
			if(loadLib===3){ 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   207
				main(); 			  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   208
			}else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   209
				// __IriSP.jQuery('#'+__IriSP.config.gui.container).html("Loading library ...");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   210
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   211
		};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   212
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   213
		/******** Our main function ********/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   214
		function main() { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   215
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   216
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   217
			//  Make __IriSP.jQuery and restore window.jQuery 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   218
			IriSP.jQuery = window.jQuery.noConflict(true);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   219
			// Call MY Jquery
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   220
			IriSP.jQuery(document).ready(function($) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   221
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   222
				/******* Load CSS *******/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   223
				var css_link_jquery = IriSP.jQuery("<link>", { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   224
					rel: "stylesheet", 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   225
					type: "text/css", 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   226
					href: IriSP.lib.cssjQueryUI,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   227
					'class': "dynamic_css"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   228
				});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   229
				var css_link_custom = IriSP.jQuery("<link>", { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   230
					rel: "stylesheet", 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   231
					type: "text/css", 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   232
					href: IriSP.config.gui.css,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   233
					'class': "dynamic_css"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   234
				});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   235
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   236
				css_link_jquery.appendTo('head');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   237
				css_link_custom.appendTo('head');   
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   238
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   239
				// to see dynamicly loaded css on IE
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   240
				if ($.browser.msie) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   241
					$('.dynamic_css').clone().appendTo('head');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   242
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   243
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   244
				//__IriSP.trace("main","ready createMyHtml");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   245
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   246
				IriSP.createMyHtml();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   247
				//__IriSP.trace("main","end createMyHtml");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   248
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   249
				/******* Load Metadata *******/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   250
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   251
				IriSP.jQuery.ajax({
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   252
					  dataType: IriSP.config.metadata.load,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   253
					  url:metadataSrc,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   254
					  success : function(json){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   255
					  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   256
							IriSP.trace("ajax","success");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   257
							
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   258
							// START PARSING ----------------------- 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   259
							if(json === ""){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   260
								alert("ERREUR DE CHARGEMENT JSON");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   261
							} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   262
							  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   263
							  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   264
								// # CREATE MEDIA  							//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   265
								// # JUSTE ONE PLAYER FOR THE MOMENT		//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   266
								//__IriSP.jQuery("<div></div>").appendTo("#output");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   267
								var MyMedia = new  __IriSP.Media(
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   268
																	json.medias[0].id,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   269
																	json.medias[0].href,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   270
																	json.medias[0]['meta']['dc:duration'],
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   271
																	json.medias[0]['dc:title'],
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   272
																	json.medias[0]['dc:description']);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   273
								
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   274
								IriSP.trace("__IriSP.MyApiPlayer",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   275
																	IriSP.config.gui.width+"   "
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   276
																	+ IriSP.config.gui.height + " "
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   277
																	+ json.medias[0].href + " "
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   278
																	+ json.medias[0]['meta']['dc:duration'] + " "
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   279
																	+ json.medias[0]['meta']['item']['value']);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   280
								
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   281
								// Create APIplayer
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   282
								IriSP.MyApiPlayer = new __IriSP.APIplayer(
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   283
																	IriSP.config.gui.width,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   284
																	IriSP.config.gui.height,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   285
																	json.medias[0].href,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   286
																	json.medias[0]['meta']['dc:duration'],
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   287
																	json.medias[0]['meta']['item']['value']);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   288
							
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   289
								// # CREATE THE FIRST LINE  				//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   290
								IriSP.trace("__IriSP.init.main","__IriSP.Ligne");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   291
								IriSP.MyLdt = new __IriSP.Ligne (
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   292
																	json['annotation-types'][0].id,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   293
																	json['annotation-types'][0]['dc:title'],
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   294
																	json['annotation-types'][0]['dc:description'],
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   295
																	json.medias[0]['meta']['dc:duration']);			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   296
								
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   297
								// CREATE THE TAG CLOUD 					//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   298
								IriSP.trace("__IriSP.init.main","__IriSP.Tags");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   299
								IriSP.MyTags =  new __IriSP.Tags (json.tags);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   300
							
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   301
								// CREATE THE ANNOTATIONS  				    //
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   302
								// JUSTE FOR THE FIRST TYPE   			 	//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   303
								IriSP.jQuery.each(json.annotations, function(i,item) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   304
									if (item.meta['id-ref'] == IriSP.MyLdt.id) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   305
										//__IriSP.trace("__IriSP.init.main","__IriSP.MyLdt.addAnnotation");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   306
										IriSP.MyLdt.addAnnotation(
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   307
													item.id,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   308
													item.begin,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   309
													item.end,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   310
													item.media,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   311
													item.content.title,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   312
													item.content.description,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   313
													item.content.color,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   314
													item.tags);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   315
									}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   316
										//MyTags.addAnnotation(item);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   317
								});	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   318
								IriSP.jQuery.each(json.lists, function(i,item) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   319
									IriSP.trace("lists","");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   320
								});	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   321
								IriSP.jQuery.each(json.views, function(i,item) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   322
									IriSP.trace("views","");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   323
								});	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   324
							}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   325
							// END PARSING ----------------------- //  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   326
						
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   327
										
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   328
					},error : function(data){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   329
						  alert("ERROR : "+data);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   330
					}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   331
				  });	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   332
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   333
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   334
			});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   335
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   336
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   337
};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   338
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   339
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   340
IriSP.createMyHtml = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   341
		var width = IriSP.config.gui.width;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   342
		var height = IriSP.config.gui.height;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   343
		var heightS = IriSP.config.gui.height-20;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   344
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   345
		// AUDIO  */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   346
		// PB dans le html : ; 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   347
		IriSP.trace("__IriSP.createMyHtml",IriSP.config.gui.container);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   348
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   349
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   350
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   351
		if(IriSP.config.gui.mode=="radio"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   352
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   353
		IriSP.jQuery("#"+IriSP.config.gui.container).before(
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   354
		"<div id='LdtSearchContainer'  style='margin-left:445px;position:absolute;'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   355
		"<div id='LdtSearch' style='display:none;background-color:#EEE;width:165px;boder:1px;border-color:#CFCFCF;position:absolute;text-align:center;'><input id='LdtSearchInput' style='margin-top:2px;margin-bottom:2px;' /></div>	\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   356
		"</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   357
		" <div class='cleaner'></div>");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   358
		IriSP.trace("__IriSP.createHtml",IriSP.config.gui.container);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   359
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   360
		IriSP.jQuery( "<div id='Ldt-Root'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   361
			"	<div id='Ldt-PlaceHolder'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   362
			"		<a href='http://www.adobe.com/go/getflashplayer'>Get flash</a> to see this player	\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   363
			"	</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   364
			"	<div id='Ldt-controler' class='demo'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   365
			"		<div class='Ldt-Control1' >\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   366
			"			<button id='ldt-CtrlPlay' onclick='__IriSP.MyApiPlayer.play()'>Lecture / Pause </button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   367
			"			<button id='ldt-CtrlNext' onclick='__IriSP.MyLdt.nextAnnotation()'>Suivant</button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   368
			"		</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   369
			"		<div id='Ldt-Annotations' class='ui-slider'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   370
			"			<div id='slider-range-min'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   371
			"	</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   372
			"		<div class='Ldt-Control2'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   373
			"			<button id='ldt-CtrlLink'  onclick='__IriSP.searchblock()'> Rechercher </button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   374
			"			<button id='ldt-CtrlSound' onclick='__IriSP.MyApiPlayer.mute()'>Sound</button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   375
			"		</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   376
			"  <div class='cleaner'>&nbsp\;</div> \n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   377
			"  <div id='Ldt-Show-Arrow-container'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   378
			"  	<div id='Ldt-Show-Arrow'> </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   379
			"  </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   380
			"</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   381
			"<div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   382
			" <div id='ldt-Show'> </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   383
			"	<div id='Ldt-ShowAnnotation-audio' class='demo' >\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   384
			"		<div id='Ldt-SaTitle'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   385
			"		<div id='Ldt-SaDescription'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   386
			" 		<div class='cleaner'><!--&nbsp\;--></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   387
			" </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   388
			" <div id='Ldt-SaKeyword'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   389
			" <div id='Ldt-SaKeywordText'>  </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   390
			" <div class='cleaner'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   391
			" <div id='Ldt-SaShareTools'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   392
			" \n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   393
			" "+IriSP.LdtShareTool+"\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   394
			" \n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   395
			"  </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   396
			" <div class='cleaner'></div>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   397
			"</div>  "+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   398
			//"<div id='Ldt-Tags'> Mots clefs : </div>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   399
			"</div>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   400
			"<div id='Ldt-output' style='clear:left;float:none;position:relative;height:200px;width:"+width+"px;overflow:scroll;' ></div>").appendTo("#"+IriSP.config.gui.container);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   401
			// special tricks IE 7
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   402
			if (IriSP.jQuery.browser.msie==true && IriSP.jQuery.browser.version=="7.0"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   403
				//LdtSearchContainer
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   404
				//__IriSP.jQuery("#LdtPlayer").attr("margin-top","50px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   405
				IriSP.jQuery("#Ldt-Root").css("padding-top","25px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   406
						IriSP.trace("__IriSP.createHtml","IE7 SPECIAL ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   407
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   408
		} else if(IriSP.config.gui.mode=="video") {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   409
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   410
			IriSP.jQuery(  "<div id='LdtSearchContainer'  style='margin-top:"+heightS+"px;margin-left:445px;position:absolute;'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   411
			"<div id='LdtSearch' style='background-color:#EEE;display:none;width:165px;boder:1px;border-color:#CFCFCF;position:absolute;text-align:center;z-index:999;'><input id='LdtSearchInput' style='margin-top:2px;margin-bottom:2px;' /></div>	\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   412
			"</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   413
			"<div id='Ldt-Root'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   414
			"	<div id='Ldt-PlaceHolder'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   415
			"		<a href='http://www.adobe.com/go/getflashplayer'>Get flash</a> to see this player	\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   416
			"	</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   417
						
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   418
			"	<div id='Ldt-controler' class='demo'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   419
			"		<div class='Ldt-Control1' >\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   420
			"			<button id='ldt-CtrlPlay' onclick='__IriSP.MyApiPlayer.play()'>Lecture / Pause </button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   421
			"			<button id='ldt-CtrlNext' onclick='__IriSP.MyLdt.nextAnnotation()'>Suivant</button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   422
			"		</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   423
			"		<div id='Ldt-Annotations' class='ui-slider'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   424
			"			<div id='slider-range-min'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   425
			"	</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   426
			"		<div class='Ldt-Control2'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   427
			"			<button id='ldt-CtrlLink'  onclick='__IriSP.searchblock()'> Rechercher </button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   428
			"			<button id='ldt-CtrlSound' onclick='__IriSP.MyApiPlayer.mute()'>Sound</button>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   429
			"		</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   430
			"  <div class='cleaner'>&nbsp\;</div> \n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   431
			"  <div id='Ldt-Show-Arrow-container'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   432
			"  	<div id='Ldt-Show-Arrow'> </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   433
			"  </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   434
			"</div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   435
			"<div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   436
			" <div id='ldt-Show'> </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   437
			"	<div id='Ldt-ShowAnnotation-audio' class='demo' >\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   438
			"		<div id='Ldt-SaTitle'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   439
			"		<div id='Ldt-SaDescription'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   440
			" 		<div class='cleaner'><!--&nbsp\;--></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   441
			" </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   442
			" <div id='Ldt-SaKeyword'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   443
			" <div id='Ldt-SaKeywordText'>  </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   444
			" <div class='cleaner'></div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   445
			" <div id='Ldt-SaShareTools'>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   446
			" \n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   447
			" "+IriSP.LdtShareTool+"\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   448
			" \n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   449
			"  </div>\n"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   450
			" <div class='cleaner'></div>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   451
			"</div>  "+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   452
			//"<div id='Ldt-Tags'> Mots clefs : </div>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   453
			"</div>"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   454
			"<div id='Ldt-output'></div>").appendTo("#"+IriSP.config.gui.container);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   455
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   456
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   457
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   458
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   459
		IriSP.trace("__IriSP.createHtml",IriSP.jQuery.browser.msie+" "+IriSP.jQuery.browser.version);		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   460
		IriSP.trace("__IriSP.createHtml","end");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   461
		IriSP.jQuery("#Ldt-Annotations").width(width-(75*2));
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   462
		IriSP.jQuery("#Ldt-Show-Arrow-container").width(width-(75*2));
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   463
		IriSP.jQuery("#Ldt-ShowAnnotation-audio").width(width-10);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   464
		IriSP.jQuery("#Ldt-ShowAnnotation-video").width(width-10);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   465
		IriSP.jQuery("#Ldt-SaKeyword").width(width-10);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   466
		IriSP.jQuery("#Ldt-controler").width(width-10);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   467
		IriSP.jQuery("#Ldt-Control").attr("z-index","100");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   468
		IriSP.jQuery("#Ldt-controler").hide();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   469
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   470
		IriSP.jQuery("<div id='Ldt-load-container'><div id='Ldt-loader'>&nbsp;</div> Chargement... </div>").appendTo("#Ldt-ShowAnnotation-audio");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   471
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   472
		if(IriSP.config.gui.mode=='radio'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   473
			IriSP.jQuery("#Ldt-load-container").attr("width",IriSP.config.gui.width);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   474
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   475
		// Show or not the output
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   476
		if(IriSP.config.gui.debug===true){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   477
			IriSP.jQuery("#Ldt-output").show();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   478
		} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   479
			IriSP.jQuery("#Ldt-output").hide();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   480
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   481
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   482
};
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   483
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   484
__IriSP.Media = function (id,url,duration,title,description){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   485
		this.id 		 	= id;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   486
		this.url 		= url;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   487
		this.title 		= title;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   488
		this.description = description;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   489
		this.duration 	= duration;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   490
		this.lignes 	  	= new Array();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   491
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   492
		IriSP.trace("__IriSP.Media","Media ID : "+id);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   493
		IriSP.trace("__IriSP.Media","Media URL : "+url);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   494
		IriSP.trace("__IriSP.Media","Media title : "+title);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   495
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   496
__IriSP.Media.prototype.createPlayerMedia = function (width,height,MyStreamer,MySwfPath){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   497
		IriSP.MyApiPlayer = new __IriSP.APIplayer(width,height,this.url,this.duration,MyStreamer,MySwfPath);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   498
		//createPlayer(width,height,this.url,this.duration,MyStreamer,MySwfPath);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   499
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   500
__IriSP.Media.prototype.getMediaDuration = function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   501
		return (this.duration);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   502
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   503
__IriSP.Media.prototype.getMediaTitle = function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   504
		return (this.title);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   505
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   506
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   507
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   508
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   509
/* 	INTERFACE : SLIDER ( CONTROL BAR ) | BUTTON ()   */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   510
IriSP.createInterface = function(width,height,duration){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   511
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   512
		IriSP.jQuery("#Ldt-controler").show();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   513
		//__IriSP.jQuery("#Ldt-Root").css('display','visible');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   514
		IriSP.trace("__IriSP.createInterface",width+","+height+","+duration+",");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   515
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   516
		IriSP.jQuery("#Ldt-ShowAnnotation").click(function () { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   517
			 //__IriSP.jQuery(this).slideUp(); 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   518
		});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   519
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   520
		var LdtpPlayerY = IriSP.jQuery("#Ldt-PlaceHolder").attr("top");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   521
		var LdtpPlayerX = IriSP.jQuery("#Ldt-PlaceHolder").attr("left");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   522
		IriSP.jQuery("#slider-range-min").slider({ //range: "min",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   523
			value: 0,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   524
			min: 1,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   525
			max: duration/1000,//1:54:52.66 = 3600+3240+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   526
			step: 0.1,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   527
			slide: function(event, ui) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   528
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   529
				//__IriSP.jQuery("#amount").val(ui.value+" s");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   530
				//player.sendEvent('SEEK', ui.value)
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   531
				IriSP.MyApiPlayer.seek(ui.value);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   532
				//changePageUrlOffset(ui.value);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   533
				//player.sendEvent('PAUSE')
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   534
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   535
		});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   536
		IriSP.trace("__IriSP.createInterface","ICI");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   537
		IriSP.jQuery("#amount").val(IriSP.jQuery("#slider-range-min").slider("value")+" s");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   538
		IriSP.jQuery(".Ldt-Control1 button:first").button({
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   539
			icons: {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   540
				primary: 'ui-icon-play'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   541
			},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   542
			text: false
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   543
		}).next().button({
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   544
			icons: {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   545
				primary: 'ui-icon-seek-next'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   546
			},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   547
			 text: false
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   548
		});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   549
		IriSP.jQuery(".Ldt-Control2 button:first").button({
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   550
			icons: {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   551
				primary: 'ui-icon-search'//,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   552
				//secondary: 'ui-icon-volume-off'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   553
			},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   554
			text: false
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   555
		}).next().button({
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   556
			icons: {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   557
				primary: 'ui-icon-volume-on'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   558
			},
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   559
			 text: false
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   560
		});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   561
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   562
		// /!\ PB A MODIFIER 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   563
		//__IriSP.MyTags.draw();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   564
		IriSP.trace("__IriSP.createInterface","ICI2");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   565
		IriSP.jQuery("#ldt-CtrlPlay").attr("style","background-color:#CD21C24;");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   566
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   567
		IriSP.jQuery("#Ldt-load-container").hide();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   568
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   569
		if(IriSP.config.gui.mode=="radio" & IriSP.jQuery.browser.msie!=true){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   570
			IriSP.jQuery("#Ldtplayer1").attr("height","0");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   571
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   572
		IriSP.trace("__IriSP.createInterface","3");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   573
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   574
		IriSP.trace("__IriSP.createInterface","END");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   575
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   576
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   577
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   578
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   579
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   580
/*  API player - work in progress ... need refactoring of code */ 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   581
__IriSP.APIplayer = function (width,height,url,duration,streamerPath,MySwfPath){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   582
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   583
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   584
		this.player 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   585
		this.hashchangeUpdate 	= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   586
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   587
		this.width				= width;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   588
		this.height				= height;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   589
		this.url				= url;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   590
		this.duration			= duration;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   591
		this.streamerPath		= streamerPath;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   592
		this.MySwfPath			= MySwfPath;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   593
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   594
		IriSP.MyApiPlayer		= this;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   595
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   596
		IriSP.createPlayer(this.url,this.streamerPath);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   597
		IriSP.trace("__IriSP.APIplayer","__IriSP.createPlayer");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   598
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   599
	//__IriSP.config.player
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   600
	/*
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   601
	- dailymotion  // &enableApi=1&chromeless=1
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   602
	- youtube 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   603
	- html5
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   604
	- flowplayer 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   605
	- jwplayer
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   606
	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   607
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   608
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   609
__IriSP.APIplayer.prototype.ready = function(player){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   610
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   611
	//__IriSP.trace("__IriSP.APIplayer.prototype.APIpReady"," __IriSP.createInterface");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   612
	IriSP.createInterface(this.width,this.height,this.duration);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   613
	//__IriSP.trace("__IriSP.APIplayer.prototype.APIpReady","END  __IriSP.createInterface");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   614
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   615
	// hashchange EVENT
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   616
	if (window.addEventListener){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   617
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   618
	// pour FIREFOX  hashchange EVENT
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   619
		window.addEventListener("hashchange", function() {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   620
		  var url = window.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   621
		  var time = IriSP.retrieveTimeFragment(url);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   622
		  IriSP.trace("__IriSP.APIplayer.prototype.ready",time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   623
		  if(IriSP.MyApiPlayer.hashchangeUpdate==null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   624
			IriSP.MyApiPlayer.seek(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   625
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   626
		  }else{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   627
			IriSP.MyApiPlayer.hashchangeUpdate=null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   628
		  }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   629
		}, false);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   630
	 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   631
	} 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   632
	else if (window.attachEvent){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   633
	// FOR IE hashchange EVENT
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   634
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   635
		window.attachEvent("onhashchange", function() {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   636
		  IriSP.trace("hashchange",time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   637
		  var url = window.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   638
		  var time = IriSP.retrieveTimeFragment(url);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   639
		  if(IriSP.MyApiPlayer.hashchangeUpdate==null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   640
			IriSP.MyApiPlayer.seek(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   641
		  }else{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   642
			IriSP.MyApiPlayer.hashchangeUpdate=null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   643
		  }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   644
		}, false);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   645
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   646
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   647
	// Search
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   648
	//__IriSP.jQuery("#LdtSearchInput").change(function() {__IriSP.Search(this.value);});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   649
	//__IriSP.jQuery("#LdtSearchInput").live('change', function(event) {__IriSP.Search(this.value);}); 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   650
	IriSP.jQuery("#LdtSearchInput").keydown(function() {IriSP.Search(this.value);});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   651
	IriSP.jQuery("#LdtSearchInput").keyup(function() {IriSP.Search(this.value);});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   652
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   653
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   654
__IriSP.APIplayer.prototype.pause = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   655
	this.hashchangeUpdate = true;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   656
	IriSP.player.sendEvent('PAUSE');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   657
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   658
__IriSP.APIplayer.prototype.play  = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   659
	this.hashchangeUpdate = true;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   660
	//__IriSP.trace("__IriSP.config.player.type",__IriSP.config.player.type);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   661
	if(IriSP.config.player.type=='jwplayer'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   662
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   663
		IriSP.player.sendEvent('PLAY');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   664
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   665
	} else if(IriSP.config.player.type=='dailymotion' 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   666
			  || IriSP.config.player.type=='youtube') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   667
			  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   668
		var status = IriSP.player.getPlayerState();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   669
		IriSP.trace("__IriSP.APIplayer.prototype.play.status",status);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   670
		if (status!=1){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   671
			IriSP.player.playVideo();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   672
		}else{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   673
			IriSP.player.pauseVideo();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   674
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   675
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   676
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   677
__IriSP.APIplayer.prototype.mute  = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   678
	IriSP.player.sendEvent('MUTE');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   679
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   680
	//alert(__IriSP.jQuery(".ui-icon-volume-on").css("background-position-x"));
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   681
	if (IriSP.jQuery(".ui-icon-volume-on").css("background-position")=="-144px -160px"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   682
		IriSP.jQuery(".ui-icon-volume-on").css("background-position","-130px -160px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   683
	} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   684
		IriSP.jQuery(".ui-icon-volume-on").css("background-position","-144px -160px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   685
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   686
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   687
__IriSP.APIplayer.prototype.share = function(network){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   688
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   689
	var MyMessage = encodeURIComponent("J'écoute Les Retours du Dimanche : ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   690
	var MyURLNow = window.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   691
	var shareURL;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   692
	//alert(network+" : "+MyURLNow);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   693
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   694
	if(network == "facebook"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   695
			shareURL = "http://www.facebook.com/share.php?u=";			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   696
		}else if(network == "twitter"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   697
			shareURL  = "http://twitter.com/home?status="+MyMessage;	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   698
		}else if(network == "myspace"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   699
			shareURL ="http://www.myspace.com/Modules/PostTo/Pages/?u=";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   700
		}else if(network == "delicious"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   701
			shareURL = "http://delicious.com/save?url=";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   702
		}else if(network == "JameSpot"){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   703
			shareURL = "http://www.jamespot.com/?action=spotit&u=";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   704
			//alert(network+" non actif pour l'instant : "+MyURLNow);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   705
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   706
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   707
	window.open(shareURL+encodeURIComponent(MyURLNow));
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   708
	//window.location.href = shareURL+encodeURIComponent(MyURLNow);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   709
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   710
__IriSP.APIplayer.prototype.seek  = function (time){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   711
	if(time==0){time=1}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   712
	IriSP.trace("__IriSP.APIplayer.prototype.seek",time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   713
	if(IriSP.config.player.type=='jwplayer'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   714
		//__IriSP.MyApiPlayer.play()
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   715
		IriSP.player.sendEvent('SEEK', time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   716
	} else if(IriSP.config.player.type=='dailymotion'
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   717
			|| IriSP.config.player.type=='youtube') {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   718
		IriSP.player.seekTo(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   719
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   720
	this.changePageUrlOffset(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   721
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   722
__IriSP.APIplayer.prototype.update = function (time){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   723
	if(time!=0){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   724
	this.hashchangeUpdate = true;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   725
	IriSP.trace("__IriSP.APIplayer.prototype.update",time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   726
	IriSP.player.sendEvent('SEEK', time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   727
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   728
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   729
__IriSP.APIplayer.prototype.changePageUrlOffset = function (time) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   730
	//alert(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   731
  IriSP.trace("__IriSP.APIplayer.prototype.changePageUrlOffset","CHANGE URL "+time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   732
  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   733
  window.location.hash = "#t=" + time;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   734
  window.location.href =  window.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   735
  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   736
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   737
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   738
/* MEDIA FRAGMENT FUNCTION by Silvia Pfeiffer */ 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   739
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   740
IriSP.jumpToTimeoffset = function (form) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   741
	var time = form.time.value;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   742
	IriSP.MyApiPlayer.changePageUrlOffset(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   743
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   744
IriSP.retrieveTimeFragment = function (url) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   745
  var pageoffset = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   746
  var offsettime = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   747
  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   748
  if (url.split("#")[1] != null) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   749
	pageoffset = url.split("#")[1];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   750
		if (pageoffset.substring(2) != null) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   751
			offsettime = pageoffset.substring(2);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   752
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   753
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   754
	return offsettime;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   755
}  
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   756
IriSP.ignoreTimeFragment = function(url){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   757
 if (url.split("#")[1] != null) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   758
	var pageurl= url.split("#")[0];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   759
 }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   760
 return pageurl;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   761
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   762
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   763
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   764
/* CODE SPECIAL JW PLAYER  creation + listener */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   765
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   766
IriSP.currentPosition 	= 0; 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   767
IriSP.currentVolume   	= 50; 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   768
IriSP.player 				= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   769
IriSP.startPosition 		= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   770
IriSP.firstplay	 		= false;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   771
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   772
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   773
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   774
IriSP.createPlayer = function (url,streamerPath) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   775
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   776
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   777
	if(IriSP.config.player.type=='dailymotion'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   778
		IriSP.config.player.src = IriSP.config.player.src+"&chromeless=1&enableApi=1";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   779
	} else if (IriSP.config.player.type=='youtube'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   780
		IriSP.config.player.src = IriSP.config.player.src+"&enablejsapi=1&version=3";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   781
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   782
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   783
	IriSP.trace("__IriSP.createPlayer","start");			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   784
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   785
	IriSP.myUrlFragment = url.split(streamerPath);	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   786
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   787
	var configTemp = IriSP.jQuery.extend(true, {}, IriSP.config);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   788
	configTemp.player.flashvars.autostart =	"true";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   789
	configTemp.player.flashvars.streamer =	streamerPath;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   790
	configTemp.player.flashvars.file =	IriSP.myUrlFragment[1];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   791
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   792
	var flashvars 		  = configTemp.player.flashvars;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   793
	var params 			  = configTemp.player.params;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   794
	var attributes 		  = configTemp.player.attributes;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   795
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   796
	IriSP.trace(
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   797
				  "__IriSP.createPlayer",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   798
				  "SWFOBJECT src:"+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   799
				  IriSP.config.player.src+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   800
				  " " +IriSP.config.gui.width+
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   801
				  " " +IriSP.config.gui.height
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   802
				  );
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   803
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   804
	swfobject.embedSWF(
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   805
						IriSP.config.player.src,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   806
						"Ldt-PlaceHolder",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   807
						IriSP.config.gui.width,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   808
						IriSP.config.gui.height,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   809
						"9.0.115",
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   810
						false,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   811
						flashvars,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   812
						params,
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   813
						attributes
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   814
					);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   815
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   816
	// need a methode to 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   817
	// re execute if this swf call does'nt work 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   818
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   819
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   820
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   821
/* API JW PLAYER 	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   822
IriSP.playerReady  = function (thePlayer) {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   823
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   824
	//__IriSP.trace("__IriSP.playerReady","PLAYER READY !!!!!!!!!!!!");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   825
	IriSP.player = window.document[thePlayer.id];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   826
	//__IriSP.trace("__IriSP.playerReady","API CALL "+__IriSP.player);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   827
	IriSP.MyApiPlayer.ready(IriSP.player);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   828
	//__IriSP.trace("__IriSP.playerReady","API CALL END ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   829
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   830
	var url = document.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   831
	var time = IriSP.retrieveTimeFragment(url);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   832
	//__IriSP.trace("__IriSP.playerReady"," "+url+" "+time );
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   833
	IriSP.startPosition = time;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   834
	//__IriSP.trace("__IriSP.playerReady"," LISTENER LAUCHER");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   835
	IriSP.addListeners();	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   836
	//__IriSP.trace("__IriSP.playerReady"," LISTENER END");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   837
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   838
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   839
IriSP.addListeners = function () {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   840
	if (IriSP.player) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   841
		IriSP.trace("__IriSP.addListeners","ADD  Listener ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   842
		IriSP.player.addModelListener("TIME", "__IriSP.positionListener");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   843
		IriSP.player.addControllerListener("VOLUME", "__IriSP.volumeListener");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   844
		IriSP.player.addModelListener('STATE', '__IriSP.stateMonitor');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   845
	} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   846
		IriSP.setTimeout("__IriSP.addListeners()",100);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   847
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   848
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   849
	// et changer les boutons
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   850
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   851
IriSP.stateMonitor = function (obj) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   852
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   853
	 if(obj.newstate == 'PAUSED')
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   854
    {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   855
		IriSP.trace("__IriSP.stateMonitor","PAUSE");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   856
		IriSP.MyApiPlayer.changePageUrlOffset(IriSP.currentPosition);			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   857
		IriSP.jQuery(".ui-icon-play").css("background-position","0px -160px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   858
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   859
	} else if (obj.newstate == 'PLAYING'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   860
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   861
		IriSP.trace("__IriSP.stateMonitor","PLAYING "+IriSP.startPosition );
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   862
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   863
		// forcer le buffering mais stop du player si dans config 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   864
		if (IriSP.config.player.flashvars.autostart=="false" && IriSP.firstplay==false && IriSP.startPosition == 0){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   865
			IriSP.trace("__IriSP.stateMonitor","first stop ???");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   866
			IriSP.MyApiPlayer.play();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   867
			IriSP.firstplay = true;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   868
			IriSP.MyLdt.checkTime(1);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   869
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   870
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   871
		// une fois la video prete a lire  la déplacer au bon timecode 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   872
		if(IriSP.startPosition!=null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   873
			IriSP.MyApiPlayer.update(IriSP.startPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   874
			IriSP.startPosition = null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   875
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   876
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   877
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   878
		IriSP.jQuery(".ui-icon-play").css("background-position","-16px -160px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   879
	} else if (obj.newstate == 'BUFFERING'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   880
		IriSP.trace("__IriSP.stateMonitor","BUFFERING : "+IriSP.config.player.flashvars.autostart);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   881
		//changePageUrlOffset(currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   882
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   883
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   884
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   885
IriSP.positionListener = function(obj) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   886
	//__IriSP.trace("__IriSP.positionListener",obj.position);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   887
	IriSP.currentPosition = obj.position; 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   888
	var tmp = document.getElementById("posit");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   889
	if (tmp) { tmp.innerHTML = "position: " + IriSP.currentPosition; }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   890
	IriSP.jQuery("#slider-range-min").slider("value", obj.position);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   891
	IriSP.jQuery("#amount").val(obj.position+" s");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   892
	// afficher annotation 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   893
	IriSP.MyLdt.checkTime(IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   894
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   895
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   896
IriSP.volumeListener   = function (obj) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   897
	IriSP.currentVolume = obj.percentage; 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   898
	var tmp = document.getElementById("vol");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   899
	if (tmp) { tmp.innerHTML = "volume: " + IriSP.currentVolume; }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   900
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   901
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   902
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   903
/* API DAILYMOTION 	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   904
onDailymotionPlayerReady = function (playerid){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   905
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   906
	//alert(playerid);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   907
	IriSP.player = document.getElementById(IriSP.config.player.attributes.id);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   908
	IriSP.MyApiPlayer.ready(IriSP.player);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   909
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   910
	var url = document.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   911
	var time = IriSP.retrieveTimeFragment(url);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   912
	IriSP.startPosition = time;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   913
	IriSP.DailymotionAddListeners();	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   914
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   915
	IriSP.MyApiPlayer.ready(playerid);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   916
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   917
IriSP.DailymotionAddListeners = function () {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   918
	if (IriSP.player) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   919
		IriSP.trace("__IriSP.addListeners","ADD  Listener ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   920
		//__IriSP.player.addEventListener("onStateChange", "__IriSP.DailymotionPositionListener");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   921
		setTimeout("__IriSP.DailymotionPositionListener()",100);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   922
		IriSP.DailymotionPositionListener();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   923
		IriSP.player.addModelListener("VOLUME", "__IriSP.volumeListener");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   924
		//__IriSP.player.addModelListener('STATE', '__IriSP.stateMonitor');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   925
	} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   926
		IriSP.setTimeout("__IriSP.DailymotionAddListeners()",100);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   927
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   928
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   929
IriSP.DailymotionPositionListener = function() { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   930
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   931
	IriSP.currentPosition = IriSP.player.getCurrentTime();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   932
	//__IriSP.trace("__IriSP.DailymotionPositionListener",__IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   933
	//__IriSP.trace("__IriSP.currentPosition",__IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   934
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   935
	IriSP.jQuery("#slider-range-min").slider("value",IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   936
	IriSP.jQuery("#amount").val(IriSP.currentPosition+" s");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   937
	// afficher annotation 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   938
	/*__IriSP.MyLdt.checkTime(__IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   939
	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   940
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   941
	setTimeout("__IriSP.DailymotionPositionListener()",10);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   942
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   943
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   944
/* API YOUTUBE 	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   945
onYouTubePlayerReady= function (playerid){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   946
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   947
	var url = document.location.href;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   948
	var time = IriSP.retrieveTimeFragment(url);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   949
	IriSP.player = document.getElementById(IriSP.config.player.attributes.id);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   950
	IriSP.startPosition = time;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   951
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   952
	IriSP.MyApiPlayer.ready(IriSP.player);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   953
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   954
	IriSP.MyApiPlayer.seek(time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   955
	IriSP.MyApiPlayer.play();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   956
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   957
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   958
	IriSP.YouTubeAddListeners();	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   959
	IriSP.trace("onYouTubePlayerReady=",time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   960
	//__IriSP.MyApiPlayer.ready(playerid);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   961
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   962
IriSP.YouTubeAddListeners = function () {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   963
	if (IriSP.player) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   964
		IriSP.trace("__IriSP.addListeners","ADD  Listener ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   965
		IriSP.player.addEventListener("onStateChange", "__IriSP.YouTubeStateMonitor");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   966
		setTimeout("__IriSP.YouTubePositionListener()",100);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   967
		IriSP.player.addModelListener("VOLUME", "__IriSP.volumeListener");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   968
		//__IriSP.player.addModelListener('STATE', '__IriSP.stateMonitor');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   969
	} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   970
		IriSP.setTimeout("__IriSP.YouTubePositionListener()",100);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   971
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   972
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   973
IriSP.YouTubePositionListener = function() { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   974
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   975
	IriSP.currentPosition = IriSP.player.getCurrentTime();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   976
	//__IriSP.trace("__IriSP.YouTubePositionListener",__IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   977
	//__IriSP.trace("__IriSP.currentPosition",__IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   978
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   979
	IriSP.MyLdt.checkTime(IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   980
	IriSP.jQuery("#slider-range-min").slider("value",IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   981
	IriSP.jQuery("#amount").val(IriSP.currentPosition+" s");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   982
	// afficher annotation 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   983
	IriSP.MyLdt.checkTime(IriSP.currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   984
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   985
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   986
	setTimeout("__IriSP.YouTubePositionListener()",10);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   987
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   988
IriSP.YouTubeStateMonitor = function (obj) { 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   989
	IriSP.player.addModelListener('__IriSP.YouTubeStateMonitor ', newstate);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   990
	//alert(newstate+" "+obj.newstate);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   991
	 if(newstate == '2')
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   992
    {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   993
		IriSP.trace("__IriSP.stateMonitor","PAUSE");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   994
		IriSP.MyApiPlayer.changePageUrlOffset(IriSP.currentPosition);			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   995
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   996
	}else if (newstate == '1'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   997
		// une fois la video prete a lire  la déplacer au bon timecode 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   998
		if(IriSP.startPosition!=null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
   999
			IriSP.MyApiPlayer.update(IriSP.startPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1000
			IriSP.startPosition = null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1001
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1002
	} 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1003
	else if (newstate == '-1'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1004
		// une fois la video prete a lire  la déplacer au bon timecode 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1005
		if(IriSP.startPosition!=null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1006
			IriSP.MyApiPlayer.update(IriSP.startPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1007
			IriSP.startPosition = null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1008
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1009
	} else if (newstate == '3'){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1010
		IriSP.trace("__IriSP.stateMonitor","BUFFERING : ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1011
		//changePageUrlOffset(currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1012
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1013
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1014
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1015
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1016
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1017
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1018
/* 	UTIL */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1019
// code from http://stackoverflow.com/questions/822452/strip-html-from-text-javascript
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1020
IriSP.stripHtml = function(s){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1021
	return s.replace(/\\&/g, '&amp;').replace(/\\</g, '&lt;').replace(/\\>/g, '&gt;').replace(/\\t/g, '&nbsp;&nbsp;&nbsp;').replace(/\\n/g, '<br />').replace(/'/g, '&#39;').replace(/"/g, '&quot;');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1022
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1023
// conversion de couleur Decimal vers HexaDecimal || 000 si fff 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1024
IriSP.DEC_HEXA_COLOR = function (dec){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1025
	 var hexa='0123456789ABCDEF',hex='';
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1026
	 var tmp;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1027
	 while (dec>15){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1028
		  tmp = dec-(Math.floor(dec/16))*16;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1029
		  hex = hexa.charAt(tmp)+hex;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1030
		  dec = Math.floor(dec/16);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1031
	 }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1032
	 hex = hexa.charAt(dec)+hex;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1033
	 if (hex == "FFCC00"){ hex="";/* by default color of Ldt annotation */ }
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1034
	 return(hex);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1035
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1036
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1037
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1038
/* Search  methodes	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1039
IriSP.SearchOldValue="";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1040
IriSP.searchblockOpen=false;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1041
IriSP.searchblock 		= function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1042
	IriSP.trace("__IriSP.searchblock",IriSP.searchblockOpen);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1043
	if (IriSP.searchblockOpen==false){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1044
		IriSP.jQuery(".ui-icon-search").css("background-position","-144px -112px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1045
		//__IriSP.jQuery("#LdtSearch").animate({height:26},250);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1046
		IriSP.jQuery("#LdtSearch").show(250);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1047
		IriSP.jQuery("#LdtSearchInput").css('background-color','#fff');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1048
		IriSP.jQuery("#LdtSearchInput").focus();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1049
		IriSP.jQuery("#LdtSearchInput").attr('value',IriSP.SearchOldValue);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1050
		IriSP.Search(IriSP.SearchOldValue);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1051
		IriSP.searchblockOpen=true;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1052
	} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1053
		IriSP.SearchOldValue = IriSP.jQuery("#LdtSearchInput").attr('value');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1054
		IriSP.jQuery("#LdtSearchInput").attr('value','');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1055
		IriSP.SearchClean();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1056
		IriSP.jQuery(".ui-icon-search").css("background-position","-160px -112px");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1057
		//__IriSP.jQuery("#LdtSearch").animate({height:0},250);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1058
		IriSP.jQuery("#LdtSearch").hide(250);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1059
		IriSP.searchblockOpen=false;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1060
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1061
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1062
IriSP.Search 				= function (value){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1063
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1064
	annotations = IriSP.LDTligne.annotations;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1065
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1066
	IriSP.trace("__IriSP.Search",annotations.length+" "+value);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1067
	var finded  = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1068
	var findmem = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1069
	var factor  = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1070
	IriSP.trace(value,value.length);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1071
	var valueS = value.toLowerCase();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1072
	IriSP.trace("__IriSP.Search",annotations.length+" "+valueS);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1073
	if(valueS.length>=3){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1074
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1075
		for (var i=0; i < annotations.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1076
			annotation = annotations[i];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1077
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1078
			IriSP.jQuery("#output2").text(annotation.title+" ?= "+value);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1079
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1080
			chaine1 = annotation.title.toLowerCase();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1081
			chaine2 = annotation.description.toLowerCase();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1082
			chaine3 = annotation.htmlTags.toLowerCase();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1083
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1084
			if(chaine1.indexOf(valueS,0) !=-1){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1085
				finded+=1;	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1086
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1087
			if(chaine2.indexOf(valueS,0) !=-1){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1088
				finded+=1;	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1089
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1090
			if(chaine3.indexOf(valueS,0) !=-1){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1091
				finded+=1;	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1092
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1093
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1094
			findmem += finded;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1095
			if(finded>0){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1096
				factor = finded*8;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1097
				IriSP.jQuery("#"+annotation.id).dequeue();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1098
				IriSP.jQuery("#"+annotation.id).animate({height:factor},200);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1099
				IriSP.jQuery("#"+annotation.id).css('border','2px');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1100
				IriSP.jQuery("#"+annotation.id).css('border-color','red');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1101
				IriSP.jQuery("#"+annotation.id).animate({opacity:0.6},200);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1102
				
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1103
				IriSP.trace("!!!!!!!!!!!!!!!!!!"," ?= "+annotation.id);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1104
				IriSP.jQuery("#LdtSearchInput").css('background-color','#e1ffe1');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1105
			}else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1106
				IriSP.jQuery("#"+annotation.id).dequeue();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1107
				IriSP.jQuery("#"+annotation.id).animate({height:0},250);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1108
				IriSP.jQuery("#"+annotation.id).animate({opacity:0.3},200);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1109
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1110
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1111
			finded = 0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1112
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1113
		if(findmem==0){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1114
				IriSP.jQuery("#LdtSearchInput").css('background-color','#f6f6f6');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1115
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1116
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1117
	} else if(value.length==0){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1118
		IriSP.SearchClean();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1119
		IriSP.jQuery("#LdtSearchInput").css('background-color','#fff');		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1120
	} else {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1121
		IriSP.SearchClean();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1122
		IriSP.jQuery("#LdtSearchInput").css('background-color','#f6f6f6');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1123
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1124
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1125
IriSP.SearchClean 		= function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1126
	annotations = IriSP.LDTligne.annotations;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1127
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1128
	for (var i=0; i < annotations.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1129
			annotation = annotations[i];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1130
			IriSP.jQuery("#"+annotation.id).dequeue();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1131
			IriSP.jQuery("#"+annotation.id).animate({height:0},100);	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1132
			IriSP.jQuery("#"+annotation.id).css('border','0px');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1133
			IriSP.jQuery("#"+annotation.id).css('border-color','red');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1134
			IriSP.jQuery("#"+annotation.id).animate({opacity:0.3},100);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1135
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1136
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1137
IriSP.SearchCleanString 	= function (value){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1138
	var reg = new RegExp("(chien)", "g");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1139
	value.replace(reg,"")
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1140
	return value;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1141
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1142
IriSP.SearchThisSegment  	= function (annotation){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1143
					IriSP.jQuery("#LdtSearchInput").text(annotation.title);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1144
					IriSP.trace("__IriSP.Ligne.prototype.checkTimeLigne",annotation.title);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1145
					/*__IriSP.jQuery("#Ldt-SaDescription").text(annotationTempo.description);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1146
					__IriSP.jQuery("#Ldt-SaKeywordText").html("Mots clefs : "+annotationTempo.htmlTags);*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1147
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1148
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1149
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1150
/* CLASS Ligne (annotationType) 	*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1151
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1152
IriSP.LDTligne 	= null;		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1153
__IriSP.Ligne = function (id,title,description,duration){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1154
	this.id 		 = id;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1155
	this.title 		 = title;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1156
	this.description = description;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1157
	//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1158
	this.annotations = new Array();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1159
	this.duration = duration;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1160
	this.annotationOldRead="";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1161
	IriSP.LDTligne = this;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1162
	IriSP.trace("__IriSP.Ligne","CREATE "+IriSP.LDTligne);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1163
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1164
__IriSP.Ligne.prototype.addAnnotation = function (id,begin,end,media,title,description,color,tags){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1165
	var myAnnotation = new __IriSP.Annotation(id,begin,end,media,title,description,color,tags,this.duration);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1166
	this.annotations.push(myAnnotation);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1167
	//__IriSP.trace("__IriSP.Ligne.prototype.addAnnotation  ","add annotation "+title);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1168
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1169
__IriSP.Ligne.prototype.onClickLigneAnnotation = function(id){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1170
	//changePageUrlOffset(currentPosition);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1171
	//player.sendEvent('SEEK', this.start);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1172
	//__IriSP.trace("SEEK",this.start);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1173
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1174
__IriSP.Ligne.prototype.searchLigneAnnotation = function(id){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1175
	/*for (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1176
	}*/
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1177
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1178
__IriSP.Ligne.prototype.listAnnotations = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1179
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1180
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1181
__IriSP.Ligne.prototype.nextAnnotation = function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1182
	var annotationCibleNumber = this.numAnnotation(this.annotationOldRead)+1;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1183
	var annotationCible = this.annotations[annotationCibleNumber];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1184
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1185
	if(annotationCibleNumber<this.annotations.length-1){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1186
		annotationCible.begin
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1187
		IriSP.player .sendEvent('SEEK', annotationCible.begin/1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1188
		IriSP.trace("LIGNE  ","| next = "+annotationCibleNumber+" - "+this.annotations.length+" | seek :"+annotationCible.begin/1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1189
	}else{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1190
		IriSP.player .sendEvent('SEEK', this.annotations[0].begin/1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1191
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1192
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1193
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1194
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1195
__IriSP.Ligne.prototype.numAnnotation = function (annotationCible){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1196
	for (var i=0; i < this.annotations.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1197
		if(annotationCible == this.annotations[i]){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1198
			return i;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1199
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1200
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1201
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1202
__IriSP.Ligne.prototype.checkTime = function(time){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1203
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1204
	var annotationTempo = -1;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1205
	//__IriSP.trace("__IriSP.Ligne.prototype.checkTimeLigne",time);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1206
	//__IriSP.trace("__IriSP.Ligne.prototype.checkTimeLigne",this.annotations.length);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1207
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1208
	for (var i=0; i < this.annotations.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1209
		annotationTempo = this.annotations[i];	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1210
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1211
		//__IriSP.SearchThisSegment(annotationTempo);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1212
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1213
		if (time>annotationTempo.begin/1000 && time<annotationTempo.end/1000){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1214
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1215
				// different form the previous
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1216
				if(annotationTempo!=this.annotationOldRead){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1217
					this.annotationOldRead = annotationTempo;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1218
					IriSP.jQuery("#Ldt-SaTitle").text(annotationTempo.title);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1219
					IriSP.jQuery("#Ldt-SaDescription").text(annotationTempo.description);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1220
					IriSP.jQuery("#Ldt-SaKeywordText").html("Mots clefs : "+annotationTempo.htmlTags);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1221
					
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1222
					//__IriSP.jQuery('#Ldt-ShowAnnotation').slideDown();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1223
					var startPourcent 	= annotationTempo.timeToPourcent((annotationTempo.begin*1+(annotationTempo.end*1-annotationTempo.begin*1)/2),annotationTempo.duration*1); 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1224
					IriSP.jQuery("#Ldt-Show-Arrow").animate({left:startPourcent+'%'},1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1225
					IriSP.jQuery("#"+annotationTempo.id).animate({alpha:'100%'},1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1226
					//alert(startPourcent);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1227
					var tempolinkurl  =  IriSP.ignoreTimeFragment(window.location.href)+"#t="+(this.annotations[i].begin/1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1228
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1229
			break;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1230
		}else{
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1231
		annotationTempo=-1;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1232
		}		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1233
		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1234
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1235
	// si il y en a pas : retractation du volet 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1236
	if( annotationTempo == -1){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1237
		if(annotationTempo!=this.annotationOldRead){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1238
			IriSP.trace("Check : ","pas d'annotation ici ");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1239
			IriSP.jQuery("#Ldt-SaTitle").text("");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1240
			IriSP.jQuery("#Ldt-SaDescription").text("");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1241
			IriSP.jQuery("#Ldt-SaKeywordText").html("");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1242
			IriSP.jQuery('#Ldt-ShowAnnotation').slideUp();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1243
			if(this.annotationOldRead){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1244
				IriSP.jQuery("#"+this.annotationOldRead.id).animate({alpha:'70%'},1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1245
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1246
			//__IriSP.jQuery("#Ldt-Show-Arrow").animate({left:'0%'},1000);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1247
			this.annotationOldRead = annotationTempo;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1248
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1249
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1250
	//__IriSP.trace("__IriSP.Ligne.prototype.checkTimeLigne",annotationTempo);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1251
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1252
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1253
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1254
/* CLASS Annotation */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1255
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1256
__IriSP.Annotation = function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1257
	var id 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1258
	var begin 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1259
	var end 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1260
	var media 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1261
	var description	= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1262
	var title 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1263
	var color 			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1264
	var tags			= null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1265
	IriSP.trace("annotation ","réussi")
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1266
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1267
__IriSP.Annotation = function(id,begin,end,media,title,description,color,tags,duration){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1268
	this.id 			= id;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1269
	this.begin 			= begin;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1270
	this.end 			= end;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1271
	this.media 			= media;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1272
	this.description 	= description;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1273
	this.title 			= title;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1274
	this.color 			= color;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1275
	this.tags			= tags;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1276
	this.htmlTags		= "";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1277
	this.duration		= duration;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1278
	// draw it 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1279
	this.draw();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1280
	this.drawTags();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1281
	//
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1282
	IriSP.trace("Annotation created : ",id);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1283
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1284
__IriSP.Annotation.prototype.draw = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1285
	//alert (this.duration);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1286
	var startPourcent 	= this.timeToPourcent(this.begin,this.duration); // temps du media 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1287
	var endPourcent 	= this.timeToPourcent(this.end,this.duration)-startPourcent;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1288
	var titleForDiv		= this.title.substr(0,55);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1289
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1290
	IriSP.jQueryAnnotationTemplate = "<div title='"+IriSP.stripHtml(titleForDiv)+"' id='"+this.id+"'  class='ui-slider-range ui-slider-range-min ui-widget-header iri-chapter' width='100%' style=\"left:"+startPourcent+"%; width:"+endPourcent+"%; padding-top:15px; border-left:solid 1px #aaaaaa; border-right:solid 1px #aaaaaa; background:#"+IriSP.DEC_HEXA_COLOR(this.color)+";\" onClick=\"__IriSP.MyApiPlayer.seek('"+Math.round(this.begin/1000)+"');__IriSP.jQuery('#Ldt-ShowAnnotation').slideDown();\"    ></div> ";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1291
	//alert(this.color+" : "+DEC_HEXA_COLOR(this.color));
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1292
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1293
	IriSP.jQuerytoolTipTemplate = "<div class='Ldt-tooltip'>"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1294
						+"<div class='title'>"+IriSP.stripHtml(this.title)+"</div>"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1295
						+"<div class='time'>"+this.begin+" : "+this.end+"</div>"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1296
						+"<div class='description'>"+IriSP.stripHtml(this.description)+"</div>"
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1297
						+"</div>";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1298
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1299
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1300
	IriSP.jQuery("<div>"+IriSP.jQueryAnnotationTemplate+"</div>").appendTo("#Ldt-Annotations");
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1301
	// TOOLTIP BUG ! 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1302
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1303
	IriSP.jQuery("#"+this.id).tooltip({ effect: 'slide'});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1304
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1305
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1306
	IriSP.jQuery("#"+this.id).fadeTo(0,0.3);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1307
	IriSP.jQuery("#"+this.id).mouseover(function() {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1308
		IriSP.jQuery("#"+this.id).animate({opacity: 0.6}, 5)
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1309
	}).mouseout(function(){		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1310
		IriSP.jQuery("#"+this.id).animate({opacity: 0.3}, 5)
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1311
	});
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1312
	IriSP.trace("__IriSP.Annotation.prototype.draw","ADD ANOTATION : "+this.begin+" "+this.end+" "+IriSP.stripHtml(this.title)+" | "+startPourcent+" | "+endPourcent+" | duration = "+this.duration);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1313
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1314
}	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1315
__IriSP.Annotation.prototype.drawTags = function(){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1316
	var KeywordPattern = '<a href=\"\"> '+' </a>';
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1317
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1318
	//__IriSP.trace(" !? Tags : ",this.tags);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1319
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1320
	if (this.tags!=undefined){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1321
		for (var i = 0; i < this.tags.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1322
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1323
			//this.htmlTags += '<span onclick=\"ShowTag('+this.tags[i]['id-ref']+');\"  > '+MyTags.getTitle(this.tags[i]['id-ref'])+' </span>'+" , ";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1324
			this.htmlTags += '<span> '+IriSP.MyTags.getTitle(this.tags[i]['id-ref'])+' </span>'+" , ";
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1325
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1326
		}		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1327
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1328
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1329
__IriSP.Annotation.prototype.tootTipAnnotation = function() {
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1330
	// 1 chercher le div correspondant
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1331
	// 2 y mettre les information
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1332
	return this.color + ' ' + this.type + ' apple';
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1333
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1334
__IriSP.Annotation.prototype.onRollOverAnnotation = function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1335
	this.tootTip();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1336
}		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1337
__IriSP.Annotation.prototype.timeToPourcent = function(time,timetotal){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1338
	return (parseInt(Math.round(time/timetotal*100)));
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1339
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1340
 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1341
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1342
/* CLASS Tags */
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1343
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1344
__IriSP.Tags = function(object){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1345
	this.myTags 	=	object;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1346
	this.htmlTags 	= 	null;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1347
	this.weigthMax 	= 	0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1348
	//this.mySegments  = 	new array();
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1349
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1350
__IriSP.Tags.prototype.addAnnotation = function (annotation){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1351
	for (var i = 0; i < this.myTags.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1352
		this.myTags[i].mySegments = new Array(); 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1353
		if (annotation.tags!=null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1354
			for (var j = 0; j < annotation.tags.length; ++j){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1355
				if (this.myTags[i]['id'] == annotation.tags[j]['id-ref']){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1356
					this.myTags[i].mySegments.push([annotation.begin,annotation.end,annotation.id]);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1357
					var weigthTempo = this.myTags[i].mySegments.length
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1358
					var tempo = this.myTags[i].mySegments[weigthTempo-1];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1359
					//__IriSP.trace ("__IriSP.Tags.prototype.addAnnotation ","  "+this.myTags[i]['meta']['dc:title']+" "+this.myTags[i]['id']+" : "+tempo[0]+" - "+tempo[1]);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1360
					
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1361
					if (this.weigthMax < weigthTempo ){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1362
						this.weigthMax = weigthTempo;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1363
					}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1364
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1365
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1366
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1367
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1368
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1369
__IriSP.Tags.prototype.getTitle = function (id){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1370
	for (var i = 0; i < this.myTags.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1371
		if(this.myTags[i]['id']==id){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1372
			return(this.myTags[i]['meta']['dc:title']);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1373
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1374
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1375
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1376
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1377
__IriSP.Tags.prototype.draw = function (){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1378
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1379
	IriSP.trace("__IriSP.Tags.prototype.draw"," !!! WELL START " );
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1380
	for (var i = 0; i < this.myTags.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1381
		IriSP.trace("__IriSP.Tags.prototype.draw"," ADD Tags : "+this.myTags[i]['id']);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1382
		if(this.myTags[i]['id']!=null){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1383
		this.htmlTags += '<span onclick=\"MyTags.show( \''+this.myTags[i]['id']
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1384
						+'\');\" style=\"font-size:'  +((this.myTags[i].mySegments.length/this.weigthMax*10)+8)
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1385
						+'px;\" alt=\"'+this.myTags[i].mySegments.length
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1386
						+'\"> '+this.myTags[i]['meta']['dc:title']+' </span>'+' , ';
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1387
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1388
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1389
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1390
	IriSP.jQuery('#Ldt-Tags').html(this.htmlTags);
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1391
	IriSP.trace("__IriSP.Tags.prototype.draw"," !!!!  END WMAX= "+this.weigthMax );
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1392
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1393
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1394
__IriSP.Tags.prototype.show = function (id){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1395
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1396
	var timeStartOffsetA	=	100000000000000000000;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1397
	var timeStartOffsetB	=	100000000000000000000;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1398
	var timeEndOffsetA		=	0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1399
	var timeEndOffsetB		=	0;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1400
	var timeStartID;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1401
	var timeEndID;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1402
	var WidthPourCent;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1403
	var leftPourCent;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1404
	var timeStartOffset;
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1405
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1406
	// case 1 : seul segment 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1407
	// case 2 : 2 ou X segments 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1408
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1409
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1410
	for (var i = 0; i < this.myTags.length; ++i){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1411
		if (this.myTags[i]['id']==id){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1412
			IriSP.trace("######### TAG DRAWing : "," END" );		
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1413
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1414
			for (var j = 0; j < this.myTags[i].mySegments.length; ++j){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1415
				if(timeStartOffset> this.myTags[i].mySegments[j][0]){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1416
					timeStartOffsetA = this.myTags[i].mySegments[j][0];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1417
					timeStartOffsetB = this.myTags[i].mySegments[j][1];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1418
					timeStartID		 = this.myTags[i].mySegments[j][2]
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1419
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1420
				if(timeStartOffset> this.myTags[i].mySegments[j][0]){
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1421
					timeEndOffsetA  = this.myTags[i].mySegments[j][0];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1422
					timeEndOffsetB  = this.myTags[i].mySegments[j][1];
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1423
					timeEndID		= this.myTags[i].mySegments[j][2]
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1424
				}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1425
			}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1426
			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1427
		}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1428
	}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1429
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1430
	// -------------------------------------------------
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1431
	// 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1432
	// -------------------------------------------------
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1433
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1434
	leftPourCent 	= IriSP.timeToPourcent((timeStartOffsetA*1+(timeStartOffsetB-timeStartOffsetA)/2),IriSP.MyLdt.duration); 
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1435
	WidthPourCent	= IriSP.timeToPourcent((timeEndOffsetA*1+(timeEndOffsetB-timeEndOffsetA)/2),IriSP.MyLdt.duration)-leftPourCent; 			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1436
	//WidthPourCent	= timeToPourcent((timeEndOffsetA*1+(timeEndOffsetB-timeEndOffsetA)/2),MyLdt.duration)-startPourcent; 			
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1437
	IriSP.jQuery("#Ldt-Show-Tags").css('left',leftPourCent+'%');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1438
	IriSP.jQuery("#Ldt-Show-Tags").css('width',WidthPourCent+'%');
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1439
	// like arrow script
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1440
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1441
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1442
	
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1443
}
0238d2e3a15e Modified the example files to use the complete source code. Included as well the developer release in the repo, for convenience.
hamidouk
parents:
diff changeset
  1444