I feel like I have tried everything.
I have the following:
<audio controls ng-src="https://myS3routeToFile" class="w-full"></audio>
I have also tried the following variation:
<audio controls>
<source src="https://myS3routeToFile" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
I am able to press download it does download the file correctly.
What am I doing wrong?
Use the second version and add an ogg version of your audio file to make it complatble with all browsers.
<audio controls>
<source src="your_file.ogg" type="audio/ogg">
<source src="your_file.mp3" type="audio/mpeg">
</audio>
Related
In my website I have audio and I use the audio tag and controls and all that but the thing is when I try to play audio on my iphone (im using chrome), it doesn't play and it just says the length of the audio is 0:00... The audio file is 40megabytes so idk if that may be an issue...
Here is my code:
<audio controls>
<source src="audio/example4-17.m4a" type="audio/mpeg">
<source src="audio/example-4-17.mp3" type="audio/mpeg">
</audio>
I'm trying to add audio to a webpage. I don't know why it isn't working.`I am doing a sound samples webpage. I can see the audio bar on the screen but the audio doesn't play. I't says that it's 0:00 long so maybe its not finding the audio. The path to the audio is C:\Users\matth\Desktop\Website\samples. I've tried it on chrome and firefox.
<div class="soundsamples">
<audio controls>
<source src="sound sample 1.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 2.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 3.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 4.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 5.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 6.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 7.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="sound sample 8.mp3" type="audio/mpeg">
</audio>
</div>
The problem with this script is that the html page cannot find the audio and therefore play it.
From your example given above, you say your audio files are located at C:\Users\matth\Desktop\Website\samples.
In order for your audio to play the html page would have to be located in the same folder as the audio itself (IE C:\Users\matth\Desktop\Website\samples) which it is not.
From your comment you say that your html file is located at C:\Users\matth\Desktop\Website so you must either change the location of the audio files or give the correct file path.
Changing the file path is easy. To access a sub-folder you would just use /SubfolderName/ and to go up a dictionary you would use ../.
So knowing that the location of the audio is C:\Users\matth\Desktop\Website\samples we would just need to go in the sub-folder samples. This can be done easily by just adding it to you existing file path. In your first example the working path would be:
.
You can see this page for more details on changing file paths.
W3schools also do a marvelous tutorial on the subject as well.
Hope I was helpful.
<video width="320" height="240" controls>
<source src="films/myfilm/video/1080p.mkv" type="video/webm">
<source src="films/myfilm/audio/en.mka" type="audio/mpeg">
</video>
I serach google and i don't find answer.
You can not directly play them using the video-tag. Your best option is to convert the files into a compatible format, see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
Otherwise, you have to use a plug-in like DivX to stream the formats to your browser:
http://www.divx.com/en/software/web-player/features
I build an app for android and windows (universal app) but i can't figure out why the audio doesn't work for windows app, it work perfectly on browser and android.
<audio controls="true">
<source src="/www/audio/FRCath.mp3" type="audio/mpeg">
</audio>
With the code above i got the player but nothing happen if i hit the play button. The player display the correct duration of the file, so the path must be good.
And this code work perfectly on edge.
edit: it work when i use my keyboard but the player doesn't respond to the mouse.
<ion-view cache-view="false" view-title="audio">
<ion-content sroll="false">
<audio controls>
<source src="/www/audio/FRCath.mp3" type="audio/mpeg">
</audio>
<audio controls>
<source src="http://www.scricciolo.com/eurosongs/Phylloscopus.inornatus.wav" type="audio/mpeg">
</audio>
</ion-content>
</ion-view>
You can do like this...you can remove the true attribute from the audio tag. And i don't know whether i am correct or not but i think your sound file is wrong somewhere, that's why i have used a different sound file.
<audio controls>
<source src="http://www.scricciolo.com/eurosongs/Phylloscopus.inornatus.wav" type="audio/mpeg">
</audio>
I have a HTML5 audio player on my website, it is not working, however it works in all browsers except chrome.
<audio controls>
<source src="http://www.mywebsite.com/path/2015-09-27.mp3" type="audio/mpeg">
</audio>
However a week or more ago the audio files did work, and I didn't change anything, they just stopped being able to be played.
I had the same problem with a mp3 file. I converted the *.mp3 file to *.ogg (e.g. with Audacity) and added a second source to the audio tag:
<audio controls>
<source src="file.mp3" type="audio/mpeg">
<source src="file.ogg" type="audio/ogg">
Your browser does not support the audio element.
</audio>
Now everything works fine.
(found at W3Schools)