How to play an audio file in html5
Play an audio file by using javascript with html5
How to play a video in html5
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Play a song as audio with different format like .wav,.mp3,.mp4</title>
<style>
</style>
</head>
<body>
<!-- Change the source path and filename acording to your directory-->
<audio controls="hidden" autoplay="true" src="Sarse.mp3" type="audio/mp3"/>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Play a song as audio with different format like .wav,.mp3,.mp4</title>
<style>
</style>
</head>
<body>
<!-- Change the source path and filename acording to your directory-->
<audio controls="hidden" autoplay="true" src="Sarse.mp3" type="audio/mp3"/>
</body>
</html>
Play an audio file by using javascript with html5
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Audio</title>
</head>
<body>
<style>
</style>
<script>
var snd = new Audio();
snd.src = "002.MP3";//change the path to your directory//
snd.addEventListener("canplaythrough",function() {
snd.play();
});
snd.load();
</script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Audio</title>
</head>
<body>
<style>
</style>
<script>
var snd = new Audio();
snd.src = "002.MP3";//change the path to your directory//
snd.addEventListener("canplaythrough",function() {
snd.play();
});
snd.load();
</script>
</body>
</html>
How to play a video in html5
<html>
<head>
<meta charset="UTF-8"/>
<title>Video</title>
</head>
<body>
<video width="320" height="240" controls autoplay="true">
<source src="d.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>
<head>
<meta charset="UTF-8"/>
<title>Video</title>
</head>
<body>
<video width="320" height="240" controls autoplay="true">
<source src="d.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>
Comments
Post a Comment