I am using the audio element of html in my website. It is working fine, but when I pause the player and go to another page, it restart from the beginning which I do not want. How can I use the common control of audio player for the website? I am new in html multimedia operations, and can not figure this out.
Html code is as follows:
<audio controls>
<source src="lotus_feet.ogg" type="audio/ogg">
<source src="lotus_feet.mp3" type="audio/mpeg">
</audio>
Any ideas would be much appreciated.
Thanks in advance.
Related
i want to know please what is the easiest way to play just the audio of a youtube video in an html page.
Ive tried to take for example a link https://www.youtube.com/embed/fJ9rUzIMcZQ and to put it in some audio formats but i kinda got stucked and didnt really know what should i do.
For example i tried this format:
<audio controls>
<source src="https://www.youtube.com/embed/fJ9rUzIMcZQ" type="audio/ogg">
</audio>
Im new here and also i'm a student from university of Kavala. I was starting learning about codes such us html and css and i was wondering how can i input some music in my html code, so when i open my index it will show up my html site with some music.
audio tags are supported since HTML 4.0. Try this:
<audio controls autoplay>
<source src="abc.ogg" type="audio/ogg">
<source src="xyz.mp3" type="audio/mpeg">
Your browser does not support audio.
</audio>
I am trying to play a song from my Desktop. This is what I have so far...
<audio src="Desktop/Moves.mp3" controls>
<p>Fallback content goes here.</p>
</audio>
I feel like something is wrong with the src but I am not sure what else to put.
First of all, the desktop is not a good place to put ANY file that you want to use in a website. Better put it in a subdirectory of the directory where your webpage is situated. So if your HTML page is in a folder named website, put the audio file in a folder inside that website folder, for example audio.
Second, it depends on the browser which audio file types it can handle. It's good to provide at least two formats, mp3 and ogg. Those two cover pretty much all browsers. Audacity can convert mp3 to ogg - it's free, you can find it via the search engine of your choice.
If you have those two files (i.e. the same piece of music, but two different filetypes), the code would for example look like this:
<audio controls>
<source src="audio/Moves.ogg" type="audio/ogg">
<source src="audio/Moves.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
try this:
<audio loop="loop" autoplay="autoplay">
<source src="Desktop/Moves.mp3" type="audio/mpeg" />
</audio>
I need your help.
I want to put a link of the music into the audio tag and it seems like this:
<audio controls autoplay>
<source src="http://www.boxca.com/lctj4xdqkhjr/Evgeny_Grinko_-_Вальс_.mp3.html" type="audio/mpeg">
<source src="http://pressplayaudio.com/?artist=Evgeny-Grinko&track=Field.ogg" type="audio/ogg">
Your browser does not support the audio element.
</audio>
But, it doesn't work and I don't know what's the problem.
you're trying to link an html website with some audio player on it, instead of referencing real audio files. This wont work.
You need to provide a reference to a physical file that you host somewhere
I am trying to embed a html5 audio tag in my web page here is the code.
<audio controls>
<source src="http://thearabiclab.com/wp-content/uploads/2015/07/arabic-word-meeting.ogg" type="audio/ogg">
<source src="http://thearabiclab.com/wp-content/uploads/2015/07/arabic-word-meeting.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
path of both the files mp3 and ogg are correct, the issue is when the page loads first time it will display the player correctly but suddenly it will transform into something like the image below.
https://www.dropbox.com/s/xkjrql4vzr3pkrh/Screenshot%202015-07-05%2015.12.56.png?dl=0
Please help to resolve this issue.
thanks
You mentioned code working fine for me..
What you can do to debug it first make a separate HTML file copy and paste the code, check if it working or not. It's looking sure... some conflict with your Js or jQuery.