Hi guys, I am Shahzad and welcome in lecture number 11 is we are going to start the audio section so you can easily understand how can you embed your audio in your HTML page or in your project. In the last lecture, we learned how can you embed your video using the video decks. So let's start you need audio. So we can see I have one audio name, my audio, I'm going to rename this my make sure is capital my audio. Okay, now I have one audio and I'm going to embed this audio in my HTML file. Make sure this is the index dot HTML file.
This is only a single file and I'm working on this file since our first project Okay, now, I'm going to come in this one so you can easily get the core So I'm saying audio. This is the audio deck. And now I'm saying audio flows. Here you have to define source. Source. And now the sources.
I'm saying, I have a file at the end of the document because this is the file in that file. I'm saying my audio audio.mp three, make sure you have to check the format. So as you can see, this is the WV format. If you are this is a WV format WAV format. If you are using the mp3, check out either it's work or not refresh the page. Now as you can see, it's not breaking to have to use the web over the period refresh the page and check out some sector My audio okay you have to use Ctrl w refresh the page.
Okay fine now if you click on this hi guys I am Shahzad and welcome. So as you can see, it's now working fine. So in this way you can embed your SD sorry audio on your, in your project or in your file make sure the controls attribute defines the play paths and volunteers gives it the play button. And also these is the volume control button. So click on this today's we are going to start a new series which is where you can see you can control your audio using this attribute. So this is the control attributes.
You can also define your error if the problem is not formed in this audio tag. I'm saying The Euro dollar is not supporting or does not support. Okay, the audio format, or audio and video refresh the page. Now my browser is supporting too. That's why the error is not showing on the page. So in this way you can embed your audio make sure the audio tax coding, mp3 or GG format and also the WAV format.
I have the WAV format single file if you have a MP three format, you can also use the mp3 format by using the dot mp3 so suddenly depend upon you. And also you can use the extra functionality or you can embed that extra functionality by using some kind of plugin some kind of jQuery plugin if you're working from the scratch if you are working on CMS systems like WordPress, you can also Now the download and install the plugins or thousands of plugins available now, make sure before html5, your audio and video file could not be played in a browser with a plug in, which is the flash. You can also use the flash to play your audio and video file. But in html5, you don't need to add the flash to play your audio and video formats. Thank you for watching.