In: Computer Science
Please provide HTML code for the following:
- Create a page that lists a set of audio files and shows their duration
- Create a page that lists a set of video files and plays a
different video when
you click on the play icon
Audio code:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Audio Check</title>
<style>
.ul-list {
list-style-type: none;
}
</style>
</head>
<body>
<ul class="ul-list">
<li>
<audio controls>
<source src="my.mp3" type="audio/mpeg">
</audio>
</li>
<li>
<audio controls>
<source src="mpthreetest.mp3" type="audio/mpeg">
</audio>
</li>
<li>
<audio controls>
<source src="my2.mp3" type="audio/mpeg">
</audio>
</li>
<li>
<audio controls>
<source src="mpthreetest1.mp3" type="audio/mpeg">
</audio>
</li>
</ul>
</body>
<html>
Output for Audio:
Video code:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>DEMO:Home</title>
<style>
.ul-list {
list-style-type: none;
}
</style>
</head>
<body>
<ul class="ul-list">
<li>
<video width="360" height="140" controls>
<source src="video/realshort.mp4" type="video/mp4">
</video>
</li>
<li>
<video width="360" height="140" controls>
<source src="video/demo.mp4" type="video/mp4">
</video>
</li>
<li>
<video width="360" height="140" controls>
<source src="video/realshort.mp4" type="video/mp4">
</video>
</li>
</ul>
</body>
<html>
Output for video: