web/musique-the-end-etc.html
author ymh <ymh.work@gmail.com>
Fri, 08 Feb 2013 17:53:10 +0100
changeset 127 49f930abb58a
parent 124 8d2376eb825c
permissions -rw-r--r--
Added tag V01.23 for changeset 7b9e8c23fb5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
     1
<!DOCTYPE html>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
     2
<html lang="fr">
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
     3
	<head>
103
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 102
diff changeset
     4
		<meta charset="UTF-8">
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 102
diff changeset
     5
		<title>THE END, ETC. UNE EXPÉRIENCE WEB DE LAETITIA MASSON</title>
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
     6
		
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
     7
		<meta name="robots" content="noindex">
105
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 103
diff changeset
     8
		<meta name="description" content="MEMO PROD présente THE END, ETC. Une coproduction FRANCE TÉLÉVISIONS - MEMO PROD avec la participation du CENTRE NATIONAL DU CINÉMA ET DE L’IMAGE ANIMÉE. Un projet écrit et réalisé par LAETITIA MASSON">
103
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 102
diff changeset
     9
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    10
		<link rel="icon" href="static/res/img/favicon.ico" />		
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    11
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    12
		<!-- Mobile Specific Metas -->		
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    13
		<meta name="viewport" content="user-scalable=no">
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    14
		<!--
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    15
		<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width" />
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    16
		-->
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    17
		
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    18
		<!-- Test Smartphone  -->
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    19
	    <script src="static/res/js/incdetectmobile.js"></script>        
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    20
		<script>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    21
			if (IsSmartphone()) { location.href = "mindex.html"; }	
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    22
		</script>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    23
		<!-- Metanav FranceTV 	-->
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    24
		<script src="http://static.francetv.fr/js/jquery.metanav-min.js" charset="utf-8"></script>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    25
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    26
		<link rel="stylesheet" href="static/res/css/style_1024.css" />
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    27
		
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    28
		<!-- tags FTV  Variables Xiti-->				
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    29
		<script>
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    30
		<!--//--><![CDATA[//><!--
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    31
			// Variables Xiti
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    32
			var xtsite = "511613";
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    33
			var xtn2 = "5";
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    34
			var xtpage = "Espace_transitoire::The_End_Etc::musique";
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    35
		//--><!]]>
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    36
		</script>
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    37
		<noscript>
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    38
			<img width="1" height="1" alt="" src="http://logc238.xiti.com/hit.xiti?s=511613&s2=5&p=Espace_transitoire::The_End_Etc::musique" >
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    39
		</noscript>
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    40
		<script src="http://static.francetv.fr/js/audience-min.js"></script>
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    41
	</head>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    42
	<body>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    43
		<!-- div content - site takes the full height of browser -->			
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    44
		<div id="content" class="full_hightScreen">
94
873b0e9ff7f6 update html
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 92
diff changeset
    45
			<div class="boxReturn">	
873b0e9ff7f6 update html
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 92
diff changeset
    46
	       		<button class="btnReturn" onClick="location.href='the-end-etc.html';">Retour</button>  
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    47
			</div>
94
873b0e9ff7f6 update html
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 92
diff changeset
    48
			
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    49
			<!--this div empty allows the element content_vcentering to be vertically aligned -->
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    50
			<section  id="intMusic" class="full_hightScreen">
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    51
				<div class="strut"></div><!--
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    52
				this comment corrects the white-space (display: inline);
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    53
				--><div id="bg_img" class="fullScreen_vcentering">
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    54
		    		<img id="bgimage" alt="The End, etc." src="static/res/img/choixMusique1.jpg" />
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    55
				</div>	
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    56
			</section>	
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    57
			<section id="playerAudio" class="positionAbs">
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    58
				<!--this div empty allows the element content_vcentering to be vertically aligned -->
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    59
				<div class="strut"></div><!--
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    60
				this comment corrects the white-space (display: inline);
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    61
				--><div class="fullScreen_vcentering white big_txt">
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    62
					<article class="boxAudio">
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
    63
						<audio id="audio1" preload="metadata">
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    64
							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/MARSEILLAISE-CHANT_3.ogg" type="audio/ogg">
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    65
  							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/MARSEILLAISE-CHANT_3.mp3" type="audio/mpeg">
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    66
							<p>Audio non supportée </p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    67
						</audio>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    68
						<button id="playpause1" onClick="play(1)" class="btnPlayPause txt_hidden">Play</button>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    69
		                
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    70
		                <!-- class="txt_white" can be used to color current time in white -->
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    71
		                <p id="current1" class="time">0'00''</p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    72
		   				<p id="title1">LA MARSEILLAISE</p><br>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    73
						
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    74
						
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
    75
						<audio id="audio2" preload="metadata">
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    76
							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/IDEE-CHANT_5.ogg" type="audio/ogg">
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    77
  							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/IDEE-CHANT_5.mp3" type="audio/mpeg">
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    78
							<p>Audio non supportée </p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    79
						</audio>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    80
						<button id="playpause2" onClick="play(2)" title="play" class="btnPlayPause txt_hidden">Play</button>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    81
		                
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    82
		                <p id="current2" class="time">0'00''</p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    83
						<p id="title2">L'IDÉE</p><br>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    84
						
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
    85
						<audio id="audio3" preload="metadata">
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    86
							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/INTERNATIONALE-CHANT_1.ogg" type="audio/ogg">
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    87
  							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/INTERNATIONALE-CHANT_1.mp3" type="audio/mpeg">
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    88
							<p>Audio non supportée </p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    89
						</audio>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    90
						<button id="playpause3" onClick="play(3)" title="play" class="btnPlayPause txt_hidden">Play</button>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    91
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    92
		                <p id="current3" class="time">0'00''</p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    93
		   				<p id="title3">L'INTERNATIONALE</p><br>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    94
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
    95
						<audio id="audio4" preload="metadata">
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    96
							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/NIDIEU-CHANT-2.ogg" type="audio/ogg">
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
    97
  							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/NIDIEU-CHANT-2.mp3" type="audio/mpeg">
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    98
							<p>Audio non supportée </p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
    99
						</audio>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   100
						<button id="playpause4" onClick="play(4)" title="play" class="btnPlayPause txt_hidden">Play</button>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   101
		               	<p id="current4" class="time">0'00''</p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   102
		   				<p id="title4">NI DIEU NI MAÎTRE</p><br>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   103
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   104
						<audio id="audio5" preload="metadata">
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
   105
	   						<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/ZEBU-CHANT_4.ogg" type="audio/ogg">
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
   106
  							<source src="http://dvvsyrlsr21oz.cloudfront.net/musique/ZEBU-CHANT_4.mp3" type="audio/mpeg">
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   107
							<p>Audio non supportée </p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   108
						</audio>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   109
						<button id="playpause5" onClick="play(5)" title="play" class="btnPlayPause txt_hidden">Play</button>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   110
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   111
		               	<p id="current5" class="time">0'00''</p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   112
		   				<p id="title5">L'ENVERS DU ZÉBU</p>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   113
		   			</article>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   114
				</div>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   115
			</section>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   116
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   117
		</div>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   118
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   119
		<!-- JavaScript -->
124
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 105
diff changeset
   120
        <script src="static/res/js/jquery-1.8.2.min.js"></script>		
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   121
        <script>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   122
            var playingIndex = -1;
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   123
            var loading = false;
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   124
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   125
            var play = function(audioIndex) {
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   126
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   127
            	if (loading) {
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   128
            		return;
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   129
            	}
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   130
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   131
            	var wasPlaying = playingIndex;
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   132
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   133
            	// Stop the current played audio ?
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   134
            	if (playingIndex !== -1 ) {
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   135
	            	var audioObj = $("#audio" + playingIndex);
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   136
	            	var audio = audioObj.get(0);
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   137
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   138
					// Unbind all events
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   139
					audioObj.unbind("canplaythrough");
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   140
					audioObj.unbind("timeupdate");
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   141
					audioObj.unbind("ended");
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   142
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   143
            		// Pause the audio
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   144
	            	audio.pause();
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   145
	            	setTimeValue(0);
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   146
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   147
            		// Change the button pause in play
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   148
            		$("#playpause" + playingIndex).css({"background-position" : '0 0'});
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   149
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   150
            		// Change the title color
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   151
					$("#title" + playingIndex).removeClass("gris");	
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   152
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   153
            		playingIndex = -1;
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   154
            	}
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   155
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   156
            	// Play a new audio
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   157
            	if (audioIndex !== wasPlaying) {
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   158
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   159
	            	var audioObj = $("#audio" + audioIndex);
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   160
	            	var audio = audioObj.get(0);
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   161
					playingIndex = audioIndex;
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   162
94
873b0e9ff7f6 update html
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 92
diff changeset
   163
	            	if (audio.readyState === 4 || audio.readyState === 3) {
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   164
						// Play the sound
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   165
						playSound(audio);
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   166
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   167
	            	} else {
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   168
		            	// Load the sound
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   169
		            	audio.load();
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   170
						loading = true;	
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   171
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   172
						audioObj.bind("canplaythrough", function() {
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   173
							// Play the sound
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   174
							playSound(audio);
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   175
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   176
							// Unbind
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   177
							audioObj.unbind("canplaythrough");						
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   178
						});
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   179
					}
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   180
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   181
	            	// Add event timeupdate
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   182
					audioObj.bind("timeupdate", function() {
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   183
						if (!loading) {
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   184
		            		setTimeValue(audio.duration - audio.currentTime);
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   185
		            	}
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   186
					});
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   187
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   188
					// Add event ended
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   189
					audioObj.bind("ended", function() {
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   190
	            		// Change the button pause in play
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   191
    	        		$("#playpause" + playingIndex).css({"background-position" : '0 0'});
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   192
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   193
    	        		// Change the title color
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   194
						$("#title" + audioIndex).removeClass("gris");	
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   195
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   196
						// Unbind
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   197
						audioObj.unbind("timeupdate");
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   198
						audioObj.unbind("ended");
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   199
						playingIndex = -1;
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   200
					});
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   201
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   202
            		// Change the button pause in play
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   203
            		$("#playpause" + audioIndex).css({"background-position" : '0 -30px'});
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   204
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   205
					// Change the title color
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   206
					$("#title" + audioIndex).addClass("gris");	
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   207
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   208
					// Set the background
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   209
					$("#bgimage").attr("src", "static/res/img/choixMusique" + (audioIndex + 1)+ ".jpg");					
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   210
            	};
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   211
            };
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   212
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   213
            var playSound = function(audio) {
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   214
				audio.currentTime = 0;
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   215
				audio.play();
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   216
				loading = false;	            	
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   217
            };
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   218
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   219
            var setTimeValue = function(time) {
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   220
	            $("#current" + playingIndex).html(secondsToTime(time));
80
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents: 78
diff changeset
   221
            };
78
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   222
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   223
            this.secondsToTime = function(sec) {
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   224
				var minutes = Math.floor(sec / 60);
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   225
				var seconds = Math.floor(sec - minutes * 60);
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   226
				if (seconds < 10) {
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   227
					seconds = "0" + seconds;
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   228
				}
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   229
				return "" + minutes + "'" + seconds + "''";
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   230
			};
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   231
        </script>						
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   232
	
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   233
	</body>
8c3f0b94d056 big commit after problems
Edwin Razafimahatratra <edwin@robotalismsoft.com>
parents:
diff changeset
   234
</html>