Bonjour,

Je ne comprends pas tout fonctionne sauf l'evenement ended, qu'est-ce qui ne va pas ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
        <head>
                <title>Chat xAjax</title>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        </head>
        <body>
<script type="text/javascript">
 
function seek(event) {
	video = document.getElementById("myvideo");
	video.currentTime = 10 ;
}
 
function play(event) { 
	video = document.getElementById("myvideo");
	video.play() ;
} 
 
</script>
        	<center><video src="video.ogg" id="myvideo" width="640" height="480" autobuffer></video></center><br>
 
		<script type="text/javascript">
			var video = document.getElementById("myvideo"); 
			video.addEventListener("canplaythrough", play , false);
			video.addEventListener("play", seek , false);
			video.addEventListener('ended', function () { alert('video playback finished') } );
		</script>
        </body>
</html>
Ma video se seek à 10s, puis à la fin je devrai avoir un message d'alerte. Je suis sous Firefox 3.5.

Une idée ?

J'ai esseyé sous differentes syntaxe, celle ci est une syntaxe copiée collée sur un script qui fonctionne et pourtant ca ne fonctionne pas non plus