Código HTML:
<!DOCTYPE html> <html lang = "es"> <head> <meta charset = "utf-8" /> <title>Insertando video html5</title> <script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type = "text/javascript"></script> <script type = "text/javascript"> $(document).ready(function() { $(".boton").mouseover(function() { $("audio")[0].play(); }); }); </script> </head> <body> <UL> <LI><a href = "#" class = "boton" >Información no ordenada.</a> <LI><a href = "#" class = "boton" >Información ordenada.</a> <LI><a href = "#" class = "boton" >Definiciones.</a> </UL> <audio src = "boing.mp3" preload> Tu explorador no soporta HTML 5, te recomiendo actualizarlo </audio> </body> </html>
Código HTML:
<!DOCTYPE html> <html lang="es"> <head> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <meta charset="utf-8" /> <title>Insertando video html5</title> </head> <body> <section> <video width="610" height="460" controls poster="Azura.jpg" id="video1"> <source src="trailer.mp4" type='video/mp4; codecs="avc1, mp4a"' > <source src="trailer.ogv" type='video/ogg; codecs="theora, vorbis"'> <iframe width="560" height="315" src="//www.youtube.com/embed/8qBB_yOv_n8" frameborder="0" allowfullscreen></iframe> <object width="160" height="90" data="video.flv"> <param name="movie" value="tu_video.flv"> <embed src="http://www.youtube.com/watch?v=8qBB_yOv_n8" width="160" height="90"> </object> Tu explorador no soporta HTML 5, actualizalo </video> <br> <button onclick="document.getElementById('video1').play()">Reproducir el video</button> <button onclick="document.getElementById('video1').pause()">Parar el video</button> <button onclick="document.getElementById('video1').volume+=0.1">Subir volumen</button> <button onclick="document.getElementById('video1').volume-=0.1">Bajar volumen</button> </section> </body> </html>