![]() ![]() ![]() Best of all, they will not have to install 3rd party plugins which means the audio will be ready to play immediately regardless of their platform (desktop/mobile) or operating system (Windows or Mac). By having multiple options available to your visitors, you increase the number of browsers that will play these files without any problems. mp3 file format (second line) and play that. For other browsers, such as I.E, it will look for the. This is important because the browser, such as Firefox, may only be able to load 'audio/ogg' file format, where the file name ends in. Line 2 & 3 The 'source' tag tells the browser where to find the audio file and the 'type' tag, otherwise known as a 'parameter', specifies the audio file type. You are telling the web browser to make sure the audio player has volume control, play button and a timer to indicate how long the file is and how much time remains on the song while it is playing. Your browser does not support the audio element. ![]() Below is the code as well as an explanation as to what each line of code does. Your First HTLM5 Audio Player Below you will notice a basic audio web player. Now that you understand which audio file types are supported by the major browsers, it is time to learn how to load these audio files through your website using HTML5. Why Format Matters Take a look at the table below and you will see how each major browsers supports, or fails to support, the major audio types. To do this, you should make sure to save your audio file (mp3 or ogg are the most popular formats) in different formats by using a conversion tool such as Max for Macintosh or Switch Sound File Converter for Windows. Just like with playing video, you use a few simple commands and make sure that the audio file formats are compatible with your visitors’ browsers. Playing audio on your website, through HTML5, is a lot easier than you may believe. ![]()
0 Comments
Leave a Reply. |