put more than one content for the polemical timeline
authorYves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
Tue, 28 Jun 2011 22:23:56 +0200
changeset 202 2bf0fd3432bf
parent 201 ace2d571aefc
child 203 8124cde38141
put more than one content for the polemical timeline
web/mashup/config.php
web/mashup/polemicaltimeline.php
web/res/css/custom.css
web/res/jquery.url/jquery.url.js
web/res/metadataplayer.polemic/src/js/polemic.js
web/res/metadataplayer/src/js/LdtPlayer.js
--- a/web/mashup/config.php	Tue Jun 28 12:23:36 2011 +0200
+++ b/web/mashup/config.php	Tue Jun 28 22:23:56 2011 +0200
@@ -42,8 +42,14 @@
 		 |  <a href='http://www.inflammableproductions.com/' class='footerLink' target='_blank'> Inflammable  </a>",
 		 
 	// After the event 
-	'metadata'	 => "",
-    'player'     => "res/metadataplayer/src/js/LdtPlayer.js"
+	'metadata'	 => array(
+	                    'conference'=>
+					         array('url'=>"http://www.iri.centrepompidou.fr/dev/ldt/ldtplatform/ldt/cljson/id/b2754186-a0c9-11e0-b8bd-00145ea49a02", 'display'=>'Conférence'),
+					    'tableronde'=>
+					         array('url'=>"http://www.iri.centrepompidou.fr/dev/ldt/ldtplatform/ldt/cljson/id/3f877114-a0cc-11e0-bc41-00145ea49a02", 'display'=>'Table Ronde')
+					),
+    'player'     => "res/metadataplayer/src/js/LdtPlayer.js",
+	'duration'	 => "4606"
 );
 
 $player_width  = 600;
--- a/web/mashup/polemicaltimeline.php	Tue Jun 28 12:23:36 2011 +0200
+++ b/web/mashup/polemicaltimeline.php	Tue Jun 28 22:23:56 2011 +0200
@@ -9,12 +9,14 @@
  // objet actuel 
 include_once 'config.php';
 
+$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
+
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html lang="<?php echo($actual); ?>">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <title>Polemic tweet - <?php echo($config['title']); ?></title>
+    <title>Polemic tweet - <?php echo($config['title']); ?> - <?php echo($url); ?></title>
 	<meta name="keywords" content="<?php echo($config['keywords']); ?>"><!-- add timestampedmetadata -->
 	<!--<meta name="description" content="PoelmicTweet.fr : debate mapping, opinion, conference, video">-->
 	<meta name="description" content="<?php echo($config['description']); ?>">
@@ -23,9 +25,14 @@
 	<!-- ICI : <?php echo($_SERVER['DOCUMENT_ROOT']); ?> -->
 	<!-- JAVASCRIPT --> 
 	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+	<script type="text/javascript">	
+		$.noConflict();
+	</script>
 	<script type="text/javascript" src="../res/raphael/raphael-min.js"></script>
 	<script type="text/javascript" src="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
 	<script type="text/javascript" src="../res/niceforms/niceforms.js"></script>
+	<script type="text/javascript" src="../res/jquery.url/jquery.url.js"></script>
+	<script type='text/javascript' src='../res/metadataplayer/src/js/LdtPlayer.js'></script>
 		
 	<!-- Framework CSS -->
     <link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection">
@@ -76,25 +83,43 @@
 			position : absolute;
 		}
 
-	</style>
+	</style>	
 	<script type="text/javascript">
-	
-	  var _gaq = _gaq || [];
-	  _gaq.push(['_setAccount', 'UA-23581291-1']);
-	  _gaq.push(['_setDomainName', '.iri.centrepompidou.fr']);
-	  _gaq.push(['_trackPageview']);
+  		// Configuration Polemical Timeline
+  		<?php
+  		if(is_array($config['metadata'])):
+  			reset($config['metadata']);
+  		    $first_key = key($config['metadata']);
+  		?>
+  		var metadatas = jQuery.parseJSON('<?php echo(json_encode($config['metadata'])); ?>');
+  		var url = jQuery.url();
+  		var metadata_key = url.fparam('metadata');
+  		if(typeof metadata_key === "undefined" || metadata_key.length === 0) {
+  			metadata_key = "<?php echo($first_key);?>";
+  		} 
+  		<?php else: ?>
+  		var metadatas = { metadata: {url: "<?php echo($config['metadata'])?>"} };
+  		var metadata_key = "metadata"; 
+  		<?php endif;?>
+  		
+		var config = {
+					target:"chartTimeline",
+					x:8,
+					y:418,
+					width:<?php echo($player_width); ?>,
+					height:<?php echo($player_height); ?>,
+					heightmax:<?php echo($player_height); ?>,
+					duration:<?php echo($config['duration']); ?>,
+					metadata:metadatas[metadata_key].url
+					};
+  	</script>
+	<script type='text/javascript' src='../res/metadataplayer.polemic/src/js/polemic.js'></script>
+	<script type="text/javascript">
+		jQuery.extend(__IriSP.lib,{jQueryToolTip:"../res/metadataplayer/res/js/jquery.tools.min.js"});
 
-	  (function() {
-	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-	  })();
-	
-	</script>
-	<script type="text/javascript">
-		$(document).ready(function() {
+		jQuery(document).ready(function() {
 		
-			$("#Embeded").fancybox({
+			jQuery("#Embeded").fancybox({
 				'width'				: 360,
 				'height'			: 360,
 				'autoDimensions'	: false,
@@ -102,25 +127,40 @@
 				'transitionOut'		: 'none',
 				'type'				: 'iframe'
 			});
+
 			
+			jQuery("#mdselect_"+metadata_key).attr("selected","selected");
+			jQuery("#mdselect").change(function() {
+				var metadata_key = this.options[this.selectedIndex].value;
+				var hashpart = window.location.hash;
+				var window_location = window.location.href;
+				if(hashpart.length === 0) {
+					hashpart = "#metadata="+metadata_key;
+				}
+				else if (hashpart.indexOf("metadata=")>=0) {
+					hashpart = hashpart.replace(/metadata=[\w\d]*/, "metadata="+metadata_key)
+				}
+				else {
+					hashpart += "&metadata="+metadata_key;
+				}
+				window.location.hash = hashpart;
+				window.location.href = window.location.href;
+				window.location.reload(true);
+			});
 		});
+	</script>	
+	<script type="text/javascript">
+		var _gaq = _gaq || [];
+		_gaq.push(['_setAccount', 'UA-23581291-1']);
+		_gaq.push(['_trackPageview']);
+		
+		(function() {
+		    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+		})();
 	</script>
-	
   </head>
-  <script type="text/javascript">
-  	// Configuration Polemical Timeline
-	var config = {
-					target:"chartTimeline",
-					x:8,
-					y:418,
-					width:650,
-					height:480,
-					heightmax:480,
-					duration:<?php echo($config['duration']); ?>,
-					metadata:"<?php echo($config['metadata']); ?>"
-					};
-  </script>
-  <script type='text/javascript' src='../res/metadataplayer.polemic/src/js/polemic.js'></script>
   <body>
   
 
@@ -139,8 +179,18 @@
 		    <?php print $translate->_("Partager"); ?></a></li>
 		  <li >&nbsp;</li>
 	  </ul>
-	  
-	<ul class="menu lang" > 
+	<?php if(is_array($config['metadata'])):?>
+	<ul id="content_select_ul" class="menu mdselect">
+	    <select id="mdselect">
+	    	<?php foreach ($config['metadata'] as $key => $value):?>
+	    	<option value="<?php echo($key); ?>" id="mdselect_<?php echo($key); ?>" ><?php echo($value['display']); ?></option>
+	    	<?php endforeach;?>
+	    </select>
+	</ul>
+	<ul class="menu shortlang" >
+	<?php else:?>
+	<ul class="menu lang" >
+	<?php endif;?>	  
 	  <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" >
 	       <img src='../images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
 	        <?php print $translate->_("Japonais"); ?></a></li>
@@ -171,43 +221,32 @@
 
 	  <div class="videoLive" >
 		<div class="videoLivePlayer">
-
-		<div id="chartTimeline"> </div>	
-		<script type="text/javascript">
-			var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
-		</script>
-		
-		<script type='text/javascript' src='../res/metadataplayer/src/js/LdtPlayer.js'></script>
-		<script type="text/javascript">
-			$.extend(__IriSP.lib,{jQueryToolTip:"../res/metadataplayer/res/js/jquery.tools.min.js"});
-		</script>
-		
-		<div id="player_project_13b0aa52-336b-11e0-b233-00145ea49a02_embed" class="iri_player_embed"> </div>
+			<div id="chartTimeline"> </div>
+			<script type="text/javascript">
+				var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
+			</script>
+			<div id="player_project_embed" class="iri_player_embed"></div>
 			<script type="text/javascript">
 				var configMP = {
-						/*metadata:{
-							format:'cinelab',
-							src:'metadata.json',
-							load:'json'},*/
 						metadata:{
 							format:'cinelab',
-							src:'<?php echo($config['metadata']); ?>',
+							src:config.metadata,
 							load:'jsonp'},
 						gui:{
-							width:650,
-							height:480,
+							width:config.width,
+							height:config.height,
 							mode:'video',
-							container:'player_project_13b0aa52-336b-11e0-b233-00145ea49a02_embed',
+							container:'player_project_embed',
 							debug:false,
 							css:'../res/css/LdtPlayer.css'},
-	
+			
 						player:{
 							type:'jwplayer',
-							src:'http://www.iri.centrepompidou.fr//dev/ldt/static/ldt/swf/player.swf'}
+							src:'../res/metadataplayer/res/swf/player.swf'}
 					};
-				__IriSP.init(configMP);     
+				__IriSP.init(configMP);
 			</script>
-		</div>	
+		</div>
 	  </div>
 
  
--- a/web/res/css/custom.css	Tue Jun 28 12:23:36 2011 +0200
+++ b/web/res/css/custom.css	Tue Jun 28 22:23:56 2011 +0200
@@ -33,7 +33,10 @@
 .menuLink{text-decoration:none; margin:5px; color:#000}
 .menuLink:active {text-decoration:none;}
 .menuLink:visited {text-decoration:none;}
+.mdselect{margin-left:100px; width: 100px}
+.mdselect select {margin-left:5px; width: 100px}
 .lang{margin-left:500px;}
+.shortlang{margin-left:300px;}
 
 .tweetContainer{position:absolute; margin-top:70px;}
 .tweetWriter{background-image:url(../../images/tweetWriterBgd.gif);width:359px;height:136px;padding:10px;position:absolute; margin-top:70px;}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/res/jquery.url/jquery.url.js	Tue Jun 28 22:23:56 2011 +0200
@@ -0,0 +1,164 @@
+// JQuery URL Parser plugin - https://github.com/allmarkedup/jQuery-URL-Parser
+// Written by Mark Perkins, mark@allmarkedup.com
+// License: http://unlicense.org/ (i.e. do what you want with it!)
+
+;(function($, undefined) {
+    
+    var tag2attr = {
+        a       : 'href',
+        img     : 'src',
+        form    : 'action',
+        base    : 'href',
+        script  : 'src',
+        iframe  : 'src',
+        link    : 'href'
+    },
+    
+	key = ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","fragment"], // keys available to query
+	
+	aliases = { "anchor" : "fragment" }, // aliases for backwards compatability
+
+	parser = {
+		strict  : /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,  //less intuitive, more accurate to the specs
+		loose   :  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs
+	},
+	
+	querystring_parser = /(?:^|&|;)([^&=;]*)=?([^&;]*)/g, // supports both ampersand and semicolon-delimted query string key/value pairs
+	
+	fragment_parser = /(?:^|&|;)([^&=;]*)=?([^&;]*)/g; // supports both ampersand and semicolon-delimted fragment key/value pairs
+	
+	function parseUri( url, strictMode )
+	{
+		var str = decodeURI( url ),
+		    res   = parser[ strictMode || false ? "strict" : "loose" ].exec( str ),
+		    uri = { attr : {}, param : {}, seg : {} },
+		    i   = 14;
+		
+		while ( i-- )
+		{
+			uri.attr[ key[i] ] = res[i] || "";
+		}
+		
+		// build query and fragment parameters
+		
+		uri.param['query'] = {};
+		uri.param['fragment'] = {};
+		
+		uri.attr['query'].replace( querystring_parser, function ( $0, $1, $2 ){
+			if ($1)
+			{
+				uri.param['query'][$1] = $2;
+			}
+		});
+		
+		uri.attr['fragment'].replace( fragment_parser, function ( $0, $1, $2 ){
+			if ($1)
+			{
+				uri.param['fragment'][$1] = $2;
+			}
+		});
+				
+		// split path and fragement into segments
+		
+        uri.seg['path'] = uri.attr.path.replace(/^\/+|\/+$/g,'').split('/');
+        
+        uri.seg['fragment'] = uri.attr.fragment.replace(/^\/+|\/+$/g,'').split('/');
+        
+        // compile a 'base' domain attribute
+        
+        uri.attr['base'] = uri.attr.host ? uri.attr.protocol+"://"+uri.attr.host + (uri.attr.port ? ":"+uri.attr.port : '') : '';
+        
+		return uri;
+	};
+	
+	function getAttrName( elm )
+	{
+		var tn = elm.tagName;
+		if ( tn !== undefined ) return tag2attr[tn.toLowerCase()];
+		return tn;
+	}
+	
+	$.fn.url = function( strictMode )
+	{
+	    var url = '';
+	    
+	    if ( this.length )
+	    {
+	        url = $(this).attr( getAttrName(this[0]) ) || '';
+	    }
+	    
+        return $.url({ url : url, strict : strictMode });
+	};
+	
+	$.url = function( opts )
+	{
+	    var url     = '',
+	        strict  = false;
+
+	    if ( typeof opts === 'string' )
+	    {
+	        url = opts;
+	    }
+	    else
+	    {
+	        opts = opts || {};
+	        strict = opts.strict || strict;
+            url = opts.url === undefined ? window.location.toString() : opts.url;
+	    }
+	    	            
+        return {
+            
+            data : parseUri(url, strict),
+            
+            // get various attributes from the URI
+            attr : function( attr )
+            {
+                attr = aliases[attr] || attr;
+                return attr !== undefined ? this.data.attr[attr] : this.data.attr;
+            },
+            
+            // return query string parameters
+            param : function( param )
+            {
+                return param !== undefined ? this.data.param.query[param] : this.data.param.query;
+            },
+            
+            // return fragment parameters
+            fparam : function( param )
+            {
+                return param !== undefined ? this.data.param.fragment[param] : this.data.param.fragment;
+            },
+            
+            // return path segments
+            segment : function( seg )
+            {
+                if ( seg === undefined )
+                {
+                    return this.data.seg.path;                    
+                }
+                else
+                {
+                    seg = seg < 0 ? this.data.seg.path.length + seg : seg - 1; // negative segments count from the end
+                    return this.data.seg.path[seg];                    
+                }
+            },
+            
+            // return fragment segments
+            fsegment : function( seg )
+            {
+                if ( seg === undefined )
+                {
+                    return this.data.seg.fragment;                    
+                }
+                else
+                {
+                    seg = seg < 0 ? this.data.seg.fragment.length + seg : seg - 1; // negative segments count from the end
+                    return this.data.seg.fragment[seg];                    
+                }
+            }
+            
+        };
+        
+	};
+	
+})(jQuery);
\ No newline at end of file
--- a/web/res/metadataplayer.polemic/src/js/polemic.js	Tue Jun 28 12:23:36 2011 +0200
+++ b/web/res/metadataplayer.polemic/src/js/polemic.js	Tue Jun 28 22:23:56 2011 +0200
@@ -269,7 +269,7 @@
 	}
 
 	
-	$(document).mousemove(function(e){
+	jQuery(document).mousemove(function(e){
 		if (over){
 			__IriSP.jQuery("#tip").css("left", e.pageX-106).css("top", e.pageY-160);
 			__IriSP.jQuery("#tipcolor").css("background-color", tipColor);
@@ -306,6 +306,6 @@
 
 	}
 	
-		$(document).ready(function() {
+		jQuery(document).ready(function() {
 			var tip 	 = __IriSP.jQuery("#tip").hide();
 		});
\ No newline at end of file
--- a/web/res/metadataplayer/src/js/LdtPlayer.js	Tue Jun 28 12:23:36 2011 +0200
+++ b/web/res/metadataplayer/src/js/LdtPlayer.js	Tue Jun 28 22:23:56 2011 +0200
@@ -453,17 +453,17 @@
 		__IriSP.trace("__IriSP.Media","Media ID : "+id);
 		__IriSP.trace("__IriSP.Media","Media URL : "+url);
 		__IriSP.trace("__IriSP.Media","Media title : "+title);
-}
+};
 __IriSP.Media.prototype.createPlayerMedia = function (width,height,MyStreamer,MySwfPath){
 		__IriSP.MyApiPlayer = new __IriSP.APIplayer(width,height,this.url,this.duration,MyStreamer,MySwfPath);
 		//createPlayer(width,height,this.url,this.duration,MyStreamer,MySwfPath);
-}
+};
 __IriSP.Media.prototype.getMediaDuration = function (){
 		return (this.duration);
-}
+};
 __IriSP.Media.prototype.getMediaTitle = function (){
 		return (this.title);
-}
+};
 
 
 
@@ -527,7 +527,7 @@
 
 		__IriSP.trace("__IriSP.createInterface","END");
 		
-	}
+	};
 
 
 /*  API player - work in progress ... need refactoring of code */ 
@@ -558,7 +558,7 @@
 	- jwplayer
 	*/
 		
-}
+};
 __IriSP.APIplayer.prototype.ready = function(player){
 
 	__IriSP.trace("__IriSP.APIplayer.prototype.APIpReady"," __IriSP.createInterface");
@@ -596,11 +596,11 @@
 		}, false);
 	}
 	
-}
+};
 __IriSP.APIplayer.prototype.pause = function(){
 	this.hashchangeUpdate = true;
 	__IriSP.player.sendEvent('PAUSE');
-}
+};
 __IriSP.APIplayer.prototype.play  = function(){
 	this.hashchangeUpdate = true;
 	__IriSP.trace("__IriSP.config.player.type",__IriSP.config.player.type);
@@ -621,12 +621,12 @@
 		__IriSP.trace("vimeo",status);
 		var status = 0;
 		if (status!=1){__IriSP.player.api_play();
-		}else{__IriSP.player.remote(moogaloop, 'api_pause')
+		}else{__IriSP.player.remote(moogaloop, 'api_pause');
 		}
 		
 	
 	}
-}
+};
 __IriSP.APIplayer.prototype.mute  = function(){
 	__IriSP.player.sendEvent('MUTE');
 	
@@ -636,7 +636,7 @@
 	} else {
 		__IriSP.jQuery(".ui-icon-volume-on").css("background-position","-144px -160px");
 	}
-}
+};
 __IriSP.APIplayer.prototype.share = function(network){
 
 	var MyMessage = encodeURIComponent("J'écoute Les Retours du Dimanche : ");
@@ -659,7 +659,7 @@
 	
 	window.open(shareURL+encodeURIComponent(MyURLNow));
 	//window.location.href = shareURL+encodeURIComponent(MyURLNow);
-}
+};
 __IriSP.APIplayer.prototype.seek  = function (time){
 	__IriSP.trace("__IriSP.APIplayer.prototype.seek",time);
 	if(__IriSP.config.player.type=='jwplayer'){
@@ -669,42 +669,83 @@
 		__IriSP.player.seekTo(time);
 	}
 	this.changePageUrlOffset(time);
-}	
+};
 __IriSP.APIplayer.prototype.update = function (time){
 	this.hashchangeUpdate = true;
 	__IriSP.player.sendEvent('SEEK', time);
-}
+};
 __IriSP.APIplayer.prototype.changePageUrlOffset = function (time) {
 	//alert(time);
   __IriSP.trace("__IriSP.APIplayer.prototype.changePageUrlOffset","CHANGE URL "+time);
-  window.location.hash = "#t=" + time;
+  window.location.hash = __IriSP.addTimeFragment(window.location.hash,time);
   window.location.href =  window.location.href;
-}
+};
 
 /* MEDIA FRAGMENT FUNCTION */
 
 __IriSP.jumpToTimeoffset = function (form) {
 	var time = form.time.value;
 	__IriSP.MyApiPlayer.changePageUrlOffset(time);
-}
+};
 __IriSP.retrieveTimeFragment = function (url) {
-  var pageoffset = 0;
+  var pageoffset = "";
   var offsettime = 0;
   
-  if (url.split("#")[1] != null) {
-	pageoffset = url.split("#")[1];
-		if (pageoffset.substring(2) != null) {
-			offsettime = pageoffset.substring(2);
+  url_components = url.split("#");
+  
+  if (url_components.length > 1){
+	anchors = url_components[1];
+
+	anchors_components = [];
+	if(anchors.indexOf(";")>=0) {
+		anchors_components = anchors.split(";");
+	}
+	else if (anchors.indexOf("&")>=0) {
+		anchors_components = anchors.split("&");
+	}
+	
+	var len = anchors_components.length;
+	for(var i=0;i<len;i++) {
+		comp = anchors_components[i];
+		if(comp.indexOf("t=") === 0) {
+			pageoffset = comp;
 		}
 	}
-	return offsettime;
-}  
+	if (pageoffset.substring(2) != null) {
+		offsettime = pageoffset.substring(2);
+	}
+  }
+  return offsettime;
+};
+__IriSP.addTimeFragment = function (hash_part,time) {
+	
+	if (time.length === 0) {
+		return hash_part;
+	}
+	var t_pos = hash_part.indexOf("t=");
+	var res = "";
+	if (t_pos >= 0) {
+		res = hash_part.replace(/t=\d*/, "t="+time);
+	}
+	else {
+		res = hash_part;
+		if(res.length === 0) {
+			res = "#";
+		}
+		if(hash_part.length > 0 && hash_part !=="#" ) {
+			res = res + "&";
+		}
+		res = res + "t="+time;
+	}
+	return res;
+};
+  
 __IriSP.ignoreTimeFragment = function(url){
  if (url.split("#")[1] != null) {
 	var pageurl= url.split("#")[0];
  }
  return pageurl;
-}
+};
 
 
 /* CODE SPECIAL JW PLAYER  creation + listener */
@@ -765,7 +806,7 @@
 	
 	// need a methode to 
 	// re execute if this swf call does'nt work 
-}
+};
 
 
 
@@ -782,7 +823,7 @@
 	__IriSP.DailymotionAddListeners();	
 	
 	__IriSP.MyApiPlayer.ready(playerid);
-}
+};
 __IriSP.DailymotionAddListeners = function () {
 	if (__IriSP.player) { 
 		__IriSP.trace("__IriSP.addListeners","ADD  Listener ");
@@ -794,7 +835,7 @@
 	} else {
 		__IriSP.setTimeout("__IriSP.DailymotionAddListeners()",100);
 	}
-}
+};
 __IriSP.DailymotionPositionListener = function() { 
 	
 	__IriSP.currentPosition = __IriSP.player.getCurrentTime();
@@ -808,7 +849,7 @@
 	*/
 	
 	setTimeout("__IriSP.DailymotionPositionListener()",10);
-}
+};
 
 /* API YOUTUBE 	*/
 onYouTubePlayerReady= function (playerid){
@@ -827,7 +868,7 @@
 	__IriSP.YouTubeAddListeners();	
 	__IriSP.trace("onYouTubePlayerReady=",time);
 	//__IriSP.MyApiPlayer.ready(playerid);
-}
+};
 __IriSP.YouTubeAddListeners = function () {
 	if (__IriSP.player) { 
 		__IriSP.trace("__IriSP.addListeners","ADD  Listener ");
@@ -838,7 +879,7 @@
 	} else {
 		__IriSP.setTimeout("__IriSP.YouTubePositionListener()",100);
 	}
-}
+};
 __IriSP.YouTubePositionListener = function() { 
 	
 	__IriSP.currentPosition = __IriSP.player.getCurrentTime();
@@ -853,7 +894,7 @@
 	
 	
 	setTimeout("__IriSP.YouTubePositionListener()",10);
-}
+};
 __IriSP.YouTubeStateMonitor = function (obj) { 
 	__IriSP.player.addModelListener('__IriSP.YouTubeStateMonitor ', newstate);
 	//alert(newstate+" "+obj.newstate);
@@ -880,7 +921,7 @@
 		//changePageUrlOffset(currentPosition);
 	}
 	
-}
+};
 
 /* API VIMEO 	*/
 onVimeoPlayerReady= function (playerid){
@@ -899,7 +940,7 @@
 	__IriSP.YouTubeAddListeners();	
 	__IriSP.trace("onYouTubePlayerReady=",time);
 	//__IriSP.MyApiPlayer.ready(playerid);
-}
+};
 __IriSP.VimeoAddListeners = function () {
 	if (__IriSP.player) { 
 		__IriSP.trace("__IriSP.addListeners","ADD  Listener ");
@@ -910,7 +951,7 @@
 	} else {
 		__IriSP.setTimeout("__IriSP.YouTubePositionListener()",100);
 	}
-}
+};
 __IriSP.VimeoPositionListener = function() { 
 	
 	__IriSP.currentPosition = __IriSP.player.getCurrentTime();
@@ -925,7 +966,7 @@
 	
 	
 	setTimeout("__IriSP.YouTubePositionListener()",10);
-}
+};
 __IriSP.VimeoStateMonitor = function (obj) { 
 	__IriSP.player.addModelListener('__IriSP.YouTubeStateMonitor ', newstate);
 	//alert(newstate+" "+obj.newstate);
@@ -952,7 +993,7 @@
 		//changePageUrlOffset(currentPosition);
 	}
 	
-}
+};
 
 /* API JW PLAYER 	*/
 __IriSP.playerReady  = function (thePlayer) {
@@ -975,7 +1016,7 @@
 	__IriSP.addListeners();	
 	//__IriSP.trace("__IriSP.playerReady"," LISTENER END");
 	
-}
+};
 __IriSP.addListeners = function () {
 	if (__IriSP.player) { 
 		__IriSP.trace("__IriSP.addListeners","ADD  Listener ");
@@ -987,7 +1028,7 @@
 	}
 
 	// et changer les boutons
-}
+};
 __IriSP.stateMonitor = function (obj) { 
 
 	
@@ -1010,7 +1051,7 @@
 		//changePageUrlOffset(currentPosition);
 	}
 	
-}
+};
 __IriSP.positionListener = function(obj) { 
 	//__IriSP.trace("__IriSP.positionListener",obj.position);
 	__IriSP.currentPosition = obj.position; 
@@ -1025,12 +1066,12 @@
 	__IriSP.MyLdt.checkTime(__IriSP.currentPosition);
 	
 	
-}
+};
 __IriSP.volumeListener   = function (obj) { 
 	__IriSP.currentVolume = obj.percentage; 
 	var tmp = document.getElementById("vol");
 	if (tmp) { tmp.innerHTML = "volume: " + __IriSP.currentVolume; }
-}	
+};
 
 
 
@@ -1039,7 +1080,7 @@
 // code from http://stackoverflow.com/questions/822452/strip-html-from-text-javascript
 __IriSP.stripHtml = function(s){
 	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;');
-}
+};
 // conversion de couleur Decimal vers HexaDecimal || 000 si fff 
 __IriSP.DEC_HEXA_COLOR = function (dec){
 	 var hexa='0123456789ABCDEF',hex='';
@@ -1052,7 +1093,7 @@
 	 hex = hexa.charAt(dec)+hex;
 	 //if (hex == "FFCC00"){ hex="";/* by default color of Ldt annotation */ }
 	 return(hex);
-}
+};
 
 
 /*
@@ -1087,30 +1128,30 @@
 	this.annotationOldRead="";
 	__IriSP.LDTligne = this;
 	__IriSP.trace("__IriSP.Ligne","CREATE "+__IriSP.LDTligne);
-}	
+};
 __IriSP.Ligne.prototype.addAnnotation = function (json){
 	var myAnnotation = new __IriSP.Annotation(json,this.duration);
 	this.annotations.push(myAnnotation);
 	//__IriSP.trace("__IriSP.Ligne.prototype.addAnnotation  ","add annotation "+title);
-}
+};
 __IriSP.Ligne.prototype.onClickLigneAnnotation = function(id){
 	//changePageUrlOffset(currentPosition);
 	//player.sendEvent('SEEK', this.start);
 	//__IriSP.trace("SEEK",this.start);
-}
+};
 __IriSP.Ligne.prototype.searchLigneAnnotation  = function(id){
 	/*for (){
 	}*/
-}
+};
 __IriSP.Ligne.prototype.listAnnotations 	   = function(){
 
-}
+};
 __IriSP.Ligne.prototype.nextAnnotation 		   = function (){
 	var annotationCibleNumber = this.numAnnotation(this.annotationOldRead)+1;
 	var annotationCible = this.annotations[annotationCibleNumber];
 
 	if(annotationCibleNumber<this.annotations.length-1){
-		annotationCible.begin
+		annotationCible.begin;
 		__IriSP.player .sendEvent('SEEK', annotationCible.begin/1000);
 		__IriSP.trace("LIGNE  ","| next = "+annotationCibleNumber+" - "+this.annotations.length+" | seek :"+annotationCible.begin/1000);
 	}else{
@@ -1118,14 +1159,14 @@
 	}
 	
 	
-}
+};
 __IriSP.Ligne.prototype.numAnnotation 		   = function (annotationCible){
 	for (var i=0; i < this.annotations.length; ++i){
 		if(annotationCible == this.annotations[i]){
 			return i;
 		}
 	}
-}
+};
 __IriSP.Ligne.prototype.checkTime			   = function(time){
 	var annotationTempo = -1;
 	
@@ -1169,7 +1210,7 @@
 		}
 	}
 	__IriSP.trace("__IriSP.Ligne.prototype.checkTimeLigne",annotationTempo);
-}
+};
 
 
 /* CLASS Annotation */
@@ -1183,8 +1224,8 @@
 	var title 			= null;
 	var color 			= null;
 	var tags			= null;
-	__IriSP.trace("annotation ","r�ussi")
-}	
+	__IriSP.trace("annotation ","réussi");
+};
 __IriSP.Annotation = function(json,duration){
 	this.id 			= json.id;
 	this.begin 			= json.begin;
@@ -1201,7 +1242,7 @@
 	this.drawTags();
 	//
 	__IriSP.trace("Annotation created : ",this.id);
-}	
+};
 
 __IriSP.Annotation.prototype.draw 				  = function(){
 
@@ -1225,13 +1266,13 @@
 	
 	__IriSP.jQuery("#"+this.id).fadeTo(0,0.3);
 	__IriSP.jQuery("#"+this.id).mouseover(function() {
-		__IriSP.jQuery("#"+this.id).animate({opacity: 0.6}, 5)
+		__IriSP.jQuery("#"+this.id).animate({opacity: 0.6}, 5);
 	}).mouseout(function(){		
-		__IriSP.jQuery("#"+this.id).animate({opacity: 0.3}, 5)
+		__IriSP.jQuery("#"+this.id).animate({opacity: 0.3}, 5);
 	});
 	__IriSP.trace("__IriSP.Annotation.prototype.draw","ADD ANOTATION : "+this.begin+" "+this.end+" "+__IriSP.stripHtml(this.title)+" | "+startPourcent+" | "+endPourcent+" | duration = "+this.duration);
 	
-}	
+};
 __IriSP.Annotation.prototype.drawTags 			  = function(){
 	var KeywordPattern = '<a href=\"\"> '+' </a>';
 	
@@ -1242,18 +1283,18 @@
 			this.htmlTags += '<span> '+__IriSP.MyTags.getTitle(this.tags[i]['id-ref'])+' </span>'+" , ";
 		}		
 	}
-}
+};
 __IriSP.Annotation.prototype.tootTipAnnotation    = function() {
 	// 1 chercher le div correspondant
 	// 2 y mettre les information
 	return this.color + ' ' + this.type + ' apple';
-}
+};
 __IriSP.Annotation.prototype.onRollOverAnnotation = function (){
 	//this.tootTip();
-}		
+};
 __IriSP.Annotation.prototype.timeToPourcent 	  = function(time,timetotal){
 	return (parseInt(Math.round(time/timetotal*100)));
-}
+};
  
 
 /* CLASS Tags */
@@ -1263,7 +1304,7 @@
 	this.htmlTags 	= 	null;
 	this.weigthMax 	= 	0;
 	//this.mySegments  = 	new array();
-}
+};
 __IriSP.Tags.prototype.addAnnotation = function (annotation){
 	for (var i = 0; i < this.myTags.length; ++i){
 		this.myTags[i].mySegments = new Array(); 
@@ -1271,7 +1312,7 @@
 			for (var j = 0; j < annotation.tags.length; ++j){
 				if (this.myTags[i]['id'] == annotation.tags[j]['id-ref']){
 					this.myTags[i].mySegments.push([annotation.begin,annotation.end,annotation.id]);
-					var weigthTempo = this.myTags[i].mySegments.length
+					var weigthTempo = this.myTags[i].mySegments.length;
 					var tempo = this.myTags[i].mySegments[weigthTempo-1];
 					//__IriSP.trace ("__IriSP.Tags.prototype.addAnnotation ","  "+this.myTags[i]['meta']['dc:title']+" "+this.myTags[i]['id']+" : "+tempo[0]+" - "+tempo[1]);
 					
@@ -1282,7 +1323,7 @@
 			}
 		}
 	}
-}
+};
 __IriSP.Tags.prototype.getTitle = function (id){
 	for (var i = 0; i < this.myTags.length; ++i){
 		if(this.myTags[i]['id']==id){
@@ -1290,7 +1331,7 @@
 		}
 	}
 
-}
+};
 __IriSP.Tags.prototype.draw = function (){
 
 	__IriSP.trace("__IriSP.Tags.prototype.draw"," !!! WELL START " );
@@ -1307,7 +1348,7 @@
 	__IriSP.jQuery('#Ldt-Tags').html(this.htmlTags);
 	__IriSP.trace("__IriSP.Tags.prototype.draw"," !!!!  END WMAX= "+this.weigthMax );
 	
-}
+};
 __IriSP.Tags.prototype.show = function (id){
 	
 	var timeStartOffsetA	=	100000000000000000000;
@@ -1332,12 +1373,12 @@
 				if(timeStartOffset> this.myTags[i].mySegments[j][0]){
 					timeStartOffsetA = this.myTags[i].mySegments[j][0];
 					timeStartOffsetB = this.myTags[i].mySegments[j][1];
-					timeStartID		 = this.myTags[i].mySegments[j][2]
+					timeStartID		 = this.myTags[i].mySegments[j][2];
 				}
 				if(timeStartOffset> this.myTags[i].mySegments[j][0]){
 					timeEndOffsetA  = this.myTags[i].mySegments[j][0];
 					timeEndOffsetB  = this.myTags[i].mySegments[j][1];
-					timeEndID		= this.myTags[i].mySegments[j][2]
+					timeEndID		= this.myTags[i].mySegments[j][2];
 				}
 			}
 			
@@ -1357,7 +1398,7 @@
 	
 	
 	
-}
+};
 
 		
 /* CLASS TRACE */
@@ -1369,11 +1410,5 @@
 		__IriSP.traceNum += 1;
 		__IriSP.jQuery("<div>"+__IriSP.traceNum+" - "+msg+" : "+value+"</div>").appendTo("#Ldt-output");
 	}
+};
 
-}
-	
-	
-	
-	
-	
-	
\ No newline at end of file