vendredi 14 octobre 2016
HTML5 & JS AUDIO
<audio id="audio">
<source src="http://dataup.sdasofia.org/MUSIC/Music-classical/Orchestersuiten%20Ouverturen%201-3/track%2004.mp3" type="audio/mp3"></source>
</audio>
<svg height="400" width="400" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg">
<ellipse cx="200" cy="200" fill="#e22b1d" id="button" rx="50" ry="50">
<animate attributename="fill" dur="86s" fill="freeze" begin="button.mousedown" values="e22b1d;fe422a;d11859;ff13a5;ff5902;ff7b33;ffb000;fce300;74c500;00b500;007411;005510;1c4c23;0091be;005d82;05125f;290f43;41075b;3f130d;7e1813;e22b1d"/>
</ellipse>
</svg>
<script type="text/javascript">
var button = document.getElementById('button');
var audio = document.getElementById('audio');
var onClick = function() {
audio.play();
};
button.addEventListener('click', onClick, false);
</script>
<br />
-
Animation attribute (width, opacity, etc.) <animate attributeName="?" begin="0s" dur="6s" repeatCount...
-
Generate