web/static/js/LdtPlayer.js
author samuel huron <admin@cybunk.com>
Tue, 15 Jun 2010 14:04:01 +0200
changeset 49 af3778eab5e8
parent 39 b620041cc891
child 53 1fcf0bd88ba3
permissions -rw-r--r--
enlever alert
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
   
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
	LDTPlayer is created by http://www.iri.centrepompidou.fr
35
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
     6
	2010-06-14 - version 0.07
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
	
35
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
     8
	init By Samuel Huron < samuel.huron (at) cybunk (dot) com >
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
     9
	
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
 INTERFACE : SLIDER ( CONTROL BAR ) | BUTTON ()   */
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
	function createInterface (width,height,duration){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
		$jIRI(function() {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
			$jIRI("#Annotations").width(width-(78*2));
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
			$jIRI("#ShowAnnotation").width(width-10);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
			$jIRI("#controlerLdt").width(width);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
			$jIRI("#Ldtplayer1").attr("z-index","100");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
			
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
			 $jIRI("#ShowAnnotation").click(function () { 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
				 $jIRI(this).slideUp(); 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
			});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
			var LdtpPlayerY = $jIRI("#ldtPlaceHolder").attr("top");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
			var LdtpPlayerX = $jIRI("#ldtPlaceHolder").attr("left");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
			
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
			//alert(LdtpPlayerY+" | "+LdtpPlayerX);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
			//$jIRI("#ShowAnnotation").attr("position","absolute");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
			/*$jIRI("#ShowAnnotation").attr("top",0);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
			$jIRI("#ShowAnnotation").attr("left",0);*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
			
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
			//$jIRI("#slider-range-min").roll
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
			$jIRI("#slider-range-min").slider({ //range: "min",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
				value: 0,
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
				min: 1,
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
				max: duration/1000,//1:54:52.66 = 3600+3240+
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
				step: 0.1,
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
				slide: function(event, ui) {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
					
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
					//$jIRI("#amount").val(ui.value+" s");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
					player.sendEvent('SEEK', ui.value)
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
					//player.sendEvent('PAUSE')
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
				}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
			});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
			$jIRI("#amount").val($jIRI("#slider-range-min").slider("value")+" s");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
			
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
			$jIRI(".ldtControl1 button:first").button({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
				icons: {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
					primary: 'ui-icon-play'
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
				},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
				text: false
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
			}).next().button({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
				icons: {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
					primary: 'ui-icon-seek-next'
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
				},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
				 text: false
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
			});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
			
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
			$jIRI(".ldtControl2 button:first").button({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
				icons: {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
					primary: 'ui-icon-newwin'//,
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
					//secondary: 'ui-icon-volume-off'
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
				},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
				text: false
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
			}).next().button({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
				icons: {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
					primary: 'ui-icon-volume-on'
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
				},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
				 text: false
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
			});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
		});	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
 CREER JW PLAYER  creation + listener */
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
	var currentPosition = 0; 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
	var currentVolume   = 50; 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
	var player 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
	function playerReady(thePlayer) {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
		//alert("ready");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
		player = window.document[thePlayer.id];
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
		addListeners();	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
	function addListeners() {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
		if (player) { 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
			player.addModelListener("TIME", "positionListener");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
			player.addControllerListener("VOLUME", "volumeListener");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
			player.addPlayPauseListener("PLAY", "state");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
		} else {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
			setTimeout("addListeners()",100);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
		}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
		// et changer les boutons
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
	//function 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
	function addPlayPauseListener(obj) { 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
		if(obj){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
			$jIRI(".control1 button:first").button({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
				icons: {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
					primary: 'ui-icon-pause'
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
				},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
				text: false
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
			});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
		}else{
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
			$jIRI(".control1 button:first").button({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
				icons: {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
					primary: 'ui-icon-play'
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
				},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
				text: false
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
			});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
		}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
	function positionListener(obj) { 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
		currentPosition = obj.position; 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
		var tmp = document.getElementById("posit");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
		if (tmp) { tmp.innerHTML = "position: " + currentPosition; }
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
		$jIRI("#slider-range-min").slider("value", obj.position);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
		$jIRI("#amount").val(obj.position+" s");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
		// afficher annotation 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
		MyLdt.checkTime(currentPosition);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
	function volumeListener(obj) { 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
		currentVolume = obj.percentage; 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
		var tmp = document.getElementById("vol");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
		if (tmp) { tmp.innerHTML = "volume: " + currentVolume; }
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   149
	function createPlayer(width,height,url,duration,streamerPath,MySwfPath) {
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
	
39
b620041cc891 update to augmented player (manage streamer)
samuel huron <admin@cybunk.com>
parents: 37
diff changeset
   151
		myUrlFragment = url.split(streamerPath);
b620041cc891 update to augmented player (manage streamer)
samuel huron <admin@cybunk.com>
parents: 37
diff changeset
   152
		file = myUrlFragment[1];
49
af3778eab5e8 enlever alert
samuel huron <admin@cybunk.com>
parents: 39
diff changeset
   153
		//alert(url+" = "+streamerPath+" + "+file);
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   154
		streamer = streamerPath;
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   155
		//alert(" StreamerPath : "+streamer+" - "+file);
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   156
		//alert(" SwfPath : "+MySwfPath);
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
		var flashvars = {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
			streamer:streamer,
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
			file:file, 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
			//live:"true",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
			autostart:"true",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
			controlbar:"none"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
		}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
		var params = {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
			allowfullscreen:"true", 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
			allowscriptaccess:"always",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
			wmode:"transparent"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
		}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
		var attributes = {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
			id:"Ldtplayer1",  
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
			name:"Ldtplayer1"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
		}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   177
		swfobject.embedSWF(MySwfPath, "ldtPlaceHolder", width, height, "9.0.115", false, flashvars, params, attributes);
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
LOAD JSON AND PARSE IT
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
	var MyLdt;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
	var Durration;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
	var playerLdtWidth;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   195
	var playerLdtHeight;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
	
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   197
	function loadJson (width,height,urlJson,MySwfPath){
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
		playerLdtWidth=width;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
		playerLdtHeight=height;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   202
		$jIRI.ajax({
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   203
					  dataType: 'jsonp',
35
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   204
					  url:urlJson,//+"?callback=callbackLdts",
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   205
					  //jsonpCallback:callbackLdts,
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
					  success: function(json){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
						
35
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   208
						//eval(json);
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   209
						//alert("callback LDTS");
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   210
						/* START PARSING ----------------------- */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   211
						/* metas , medias , annotation-types , annotations , lists , tags , views */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   212
						/* # fonction avec 1 seul  media et 1 seul annotation type  code a cleaner */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   213
						/* # cr�er le player 				   */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   214
						//$jIRI.each(json.medias, function(i,item) {
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   215
						//});
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   216
						$jIRI("<div></div>").appendTo("#output");
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   217
						MyMedia = new  Media(json.medias[0].id,json.medias[0].href,json.medias[0]["meta"]["dc:duration"],json.medias[0]['dc:title'],json.medias[0]['dc:description']);
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   218
						//alert(" MySwfPath : "+MySwfPath);
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   219
						MyMedia.createPlayer(playerLdtWidth,playerLdtHeight,json.medias[0]["meta"]["item"]["value"],MySwfPath);
35
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   220
						//alert("success loading ! "+json.medias[0]["meta"]["dc:duration"]+ " | " +json.medias[0]["meta"]["item"]["value"]);
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   221
						
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   222
						/* # cr�er lignes 				   */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   223
						/*$jIRI.each(json['annotation-types'], function(i,item) {
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   224
						});*/	
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   225
						MyLdt = new Ligne (json['annotation-types'][0].id,json['annotation-types'][0]['dc:title'],json['annotation-types'][0]['dc:description'],json.medias[0]["meta"]["dc:duration"]);
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   226
						//alert("duration : "+json.medias[0]["dc:duration"]);
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
						
35
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   228
						/* # cr�er les annotations 				   */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   229
						$jIRI.each(json.annotations, function(i,item) {
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   230
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   231
							MyLdt.addAnnotation(
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   232
										item.id,
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   233
										item.begin,
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   234
										item.end,
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   235
										item.media,
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   236
										item.content.title,
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   237
										item.content.description,
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   238
										item.content.color);
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   239
						
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   240
						});	
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   241
						$jIRI.each(json.lists, function(i,item) {
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   242
							trace("lists","");
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   243
						});		
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   244
						$jIRI.each(json.tags, function(i,item) {
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   245
							trace("tags","");
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   246
						});	
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   247
						$jIRI.each(json.views, function(i,item) {
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   248
							trace("views","");
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   249
						});	
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   250
						/* END PARSING ----------------------- */
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   251
						
6e5ffd90610c Update JS form json parsing
samuel huron <admin@cybunk.com>
parents: 33
diff changeset
   252
										
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
					}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   254
					,error: function(data){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   255
						  alert("ERROR : "+data);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   256
					}		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   257
				  });	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   258
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   259
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   260
	function callbackLdts(json){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   261
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   264
	function trace (msg,value){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   265
		$jIRI("<div>"+msg+" : "+value+"</div>").appendTo("#output");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   266
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   268
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   269
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   270
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   271
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   272
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   273
INIT player LDT  
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   274
*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   276
	function playerLdt (width,height,file,divId,MySwfPath){
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   277
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   278
			$jIRI("#"+divId).append("<div id=\"ldtShow\">\n	<div id=\"ShowAnnotation\" class=\"demo\" >\n			<div id=\"ldtSaTitle\"></div>\n			<div id=\"ldtSaDescription\"></div>\n		</div>		<div id=\"ldtPlaceHolder\">\n			<a href=\"http://www.adobe.com/go/getflashplayer\">Get flash</a> to see this player	\n		</div>\n	</div>\n	<div id=\"controlerLdt\" class=\"demo\">\n		<div class=\"ldtControl1\" >\n			<button id=\"ldtCtrlPlay\" onclick=\"player.sendEvent('PLAY')\">Play</button>\n			<button id=\"ldtCtrlNext\" onclick=\"player.sendEvent('SEEK', currentPosition+10)\">next</button>\n		</div>\n		<div id=\"Annotations\" class=\"ui-slider\">\n			<div id=\"slider-range-min\"></div>\n		</div>\n		<div class=\"ldtControl2\">\n			<button id=\"ldtCtrlScreen\" onclick=\"player.fullscreen('true')\">Enlarge</button>\n			<button id=\"ldtCtrlSound\" onclick=\"player.sendEvent('MUTE')\">Sound</button>\n		</div>\n	</div>");
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   279
			loadJson(width,height,file,MySwfPath);
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   280
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   281
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   282
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   284
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   285
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   286
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   287
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   288
 API player */
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   291
	function APIplayer (){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   294
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   297
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   298
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   299
	Class Media
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   300
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   301
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   302
		"http://advene.liris.cnrs.fr/ns/frame_of_reference/ms":"o=0",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   303
		"id":"kia_closeup",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   304
		"url":"D:/Thibaut/Outils_techno/IRI-LignesDeTemps/media/video/kia_closeup_BQ.flv",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   305
		"dc:creator":"tcavalie",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   306
		"dc:created":"2010-05-04T00:00:00",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   307
		"dc:contributor":"tcavalie",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   308
		"dc:modified":"2010-05-04T00:00:00",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   309
		"dc:creator.contents":"Abbas Kiarostami",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   310
		"dc:created.contents":"1990",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   311
		"dc:title":"Close Up is a very very long title",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   312
		"dc:description":"Analyse de Close Up",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   313
		"dc:duration":"689266"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   314
	*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   315
	function Media (id,url,duration,title,description){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   316
		this.id 		 = id;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   317
		this.url 		 = url;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   318
		this.title 		 = title;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   319
		this.description = description;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   320
		this.duration 	 = duration;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   321
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   322
		this.lignes = new Array();
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   323
		this.updatePlayer = updatePlayerMedia;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   324
		this.getDuration = getMediaDuration;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   325
		this.createPlayer = createPlayerMedia;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   326
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   327
		trace("Media ID :",id);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   328
		trace("Media URL :",this.url);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   329
		trace("- content : color",url);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   330
		trace("- content : audio",title);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   331
	}
37
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   332
	function createPlayerMedia(width,height,MyStreamer,MySwfPath){
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   333
		//alert("create swfpath : "+MySwfPath+" my streame : "+MyStreamer);
b694a7a67500 Update Custom SwfPath in PlayerLdt parameter
samuel huron <admin@cybunk.com>
parents: 35
diff changeset
   334
		createPlayer(width,height,this.url,this.duration,MyStreamer,MySwfPath);
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   335
		createInterface(width,height,this.duration);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   336
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   337
	function updatePlayerMedia(){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   338
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   339
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   340
	function getMediaDuration(){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   341
		return (this.duration);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   342
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   343
	function getMediaTitle(){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   344
		return (this.title);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   345
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   346
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   347
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   348
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   349
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   350
 Class Ligne (annotationType) 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   351
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   352
		"id":"dp_1",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   353
		"dc:creator":"tcavalie",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   354
		"dc:created":"2010-04-04T19:09:44",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   355
		"dc:contributor":"perso",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   356
		"dc:modified":"15/2/2008",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   357
		"dc:title":"dqsdkljfh qklsdhf very very very long",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   358
		"dc:description":"sdfg sdfg sdfg sdfg"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   359
	*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   360
	function Ligne (){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   361
		this.id 			= id;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   362
		this.title 			= title;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   363
		this.description 	= description;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   364
		this.annotations 	= new Array();
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   365
		this.addAnnotation  = addAnnotationligne;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   366
		this.clickAnnotation= onClickLigneAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   367
		this.checkTime 		= checkTimeLigne;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   368
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   369
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   370
	function Ligne (id,title,description,duration){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   371
		this.id 		 = id;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   372
		this.title 		 = title;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   373
		this.description = description;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   374
		//
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   375
		this.annotations = new Array();
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   376
		this.addAnnotation = addLigneAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   377
		this.checkTime 	= checkTimeLigne;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   378
		this.duration = duration;
33
6eea55d40942 rollback changes made for the player, bumpup version nb
ymh <ymh.work@gmail.com>
parents: 30
diff changeset
   379
		trace("LIGNE  ","cr�er ");
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   380
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   381
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   382
	function addLigneAnnotation(id,begin,end,media,title,description,color){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   383
		var myAnnotation = new Annotation(id,begin,end,media,title,description,color,this.duration);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   384
		this.annotations.push(myAnnotation);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   385
		trace("LIGNE  ","add annotation ");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   386
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   387
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   388
	function onClickLigneAnnotation(id){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   389
		player.sendEvent('SEEK', this.start);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   390
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   391
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   392
	function searchLigneAnnotation(id){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   393
		/*for (){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   394
		}*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   395
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   396
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   397
	function listAnnotations(){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   398
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   399
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   400
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   401
	function checkTimeLigne(time){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   402
		var annotationTempo;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   403
		for (var i=0; i < this.annotations.length; ++i){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   404
			var annotationTempo = this.annotations[i];
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   405
			//trace("check... ",time+" = "+annotationTempo.begin+" -- "+annotationTempo.end);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   406
			//if (time>annotationTempo.begin){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   407
			if (time>annotationTempo.begin/1000 && time<annotationTempo.end/1000){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   408
				//trace("check ",annotationTempo.begin+" "+annotationTempo.end +" "+annotationTempo.title);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   409
				$jIRI("#ldtSaTitle").text(annotationTempo.title);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   410
				$jIRI("#ldtSaDescription").text(annotationTempo.description);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   411
				break;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   412
			} 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   413
		}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   414
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   415
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   416
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   417
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   418
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   419
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   420
  CLASSE Annotation 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   421
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   422
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   423
		"begin":"767",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   424
		"end":"785",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   425
		"id":"dp_1_sp_3",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   426
		"media":"kia_closeup",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   427
		"content": {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   428
						"mimetype":"application/x-ldt-structured",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   429
						"title":"mon titre",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   430
						"description":"ma description en &lt;b&gt;gras&lt;/b&gt; .",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   431
						"color":"16763904",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   432
						"audio":{"src":"","mimetype":"audio/mp3","href":""}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   433
					},
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   434
		"meta":
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   435
				{
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   436
					"id-ref":"dp_1",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   437
					"dc:creator":"tcavalie",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   438
					"dc:created":"2010-04-04T19:09:44",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   439
					"dc:contributor":"perso",
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   440
					"dc:modified":"9/10/2007"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   441
				}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   442
	*/
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   443
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   444
	function Annotation (){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   445
		this.id 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   446
		this.begin 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   447
		this.end 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   448
		this.media 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   449
		this.description	= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   450
		this.title 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   451
		this.color 			= null;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   452
		this.onRollOver 	= onRollOverAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   453
		this.onClick 		= onClickAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   454
		this.toolTip 		= rollOverAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   455
		this.draw 			= drawAnnotation;
33
6eea55d40942 rollback changes made for the player, bumpup version nb
ymh <ymh.work@gmail.com>
parents: 30
diff changeset
   456
		trace("annotation ","r�ussi")
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   457
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   458
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   459
	function Annotation (id,begin,end,media,title,description,color,duration){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   460
		this.id 			= id;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   461
		this.begin 			= begin;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   462
		this.end 			= end;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   463
		this.media 			= media;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   464
		this.description 	= description;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   465
		this.title 			= title;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   466
		this.color 			= title;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   467
		this.duration		= duration;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   468
		//
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   469
		this.onRollOver 	= onRollOverAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   470
		//this.onClick 		= onClickAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   471
		this.toolTip 		= tootTipAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   472
		this.draw 			= drawAnnotation;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   473
		//this.show 			= showAnnotationNotice;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   474
		// draw it 
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   475
		this.draw();
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   476
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   477
		//
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   478
		trace("Annotation created : ",id);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   479
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   480
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   481
	function drawAnnotation (){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   482
		//alert (this.duration);
33
6eea55d40942 rollback changes made for the player, bumpup version nb
ymh <ymh.work@gmail.com>
parents: 30
diff changeset
   483
		startPourcent = timeToPourcent(this.begin,this.duration); // temps du m�dia 
30
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   484
		endPourcent = timeToPourcent(this.end,this.duration)-startPourcent;
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   485
				
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   486
		$AnnotationTemplate = "<div title='"+this.title+"' 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;' onclick=\"player.sendEvent('SEEK', '"+Math.round(this.begin/1000)+"');$jIRI('#ShowAnnotation').slideDown().delay(5000).slideUp();\"  ></div> ";
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   487
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   488
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   489
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   490
		$toolTipTemplate = "<div class='tooltip'>"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   491
							+"<div class='title'>"+this.title+"</div>"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   492
							+"<div class='time'>"+this.begin+" : "+this.end+"</div>"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   493
							+"<div class='description'>"+this.description+"</div>"
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   494
							+"</div>";
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   495
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   496
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   497
		$jIRI("<div>"+$AnnotationTemplate+"</div>").appendTo("#Annotations");
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   498
		$jIRI("#"+this.id).tooltip({ effect: 'slide'});
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   499
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   500
		trace(" ### ","ADD ANOTATION : "+this.begin+" "+this.end+" "+this.title+" | "+startPourcent+" | "+endPourcent+" | duration = "+this.duration);
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   501
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   502
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   503
	function tootTipAnnotation() {
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   504
		// 1 chercher le div correspondant
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   505
		// 2 y mettre les information
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   506
		return this.color + ' ' + this.type + ' apple';
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   507
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   508
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   509
	function onRollOverAnnotation(){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   510
		this.tootTip();
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   511
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   512
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   513
	function timeToPourcent(time,timetotal){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   514
		return (parseInt(Math.round(time/timetotal*100)));
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   515
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   516
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   517
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   518
/* ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   519
   ----------------------------------------------------------------
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   520
	Class tracess */
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   521
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   522
	function Tracer (){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   523
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   524
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   525
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   526
	function addTrace(){
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   527
		
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   528
	}
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   529
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   530
	
81d408373dde itry to have the player in the preview page
ymh <ymh.work@gmail.com>
parents:
diff changeset
   531