+ 1

i have added an audio file in my code but its not working in the browser..what should i do?

21st May 2017, 1:20 PM
Simrankaur Saluja
Simrankaur Saluja - avatar
3 Antworten
+ 10
<audio controls> <source src= "audio.ogg" type= "audio/ogg"> <source src= "audio.mp3" type= "audio/mpeg"> </audio> • Background Audio does not work in old browsers, this code provides a control. • You need to insert the correct path in the "src" attribute, if the audio file is in the same folder of your ".html" file, you can follow my example, (naturally change "audio.mp3" with your audio's name) • Can you provide your code? I can't guess the problem without details, unfortunately i'm not a wizard. :(
21st May 2017, 1:30 PM
Maz
Maz - avatar
+ 6
@Maz Yeah you're right. 😂 She only ask what's her problem but didn't detailed her question. @Simrankaur Saluja maybe we can help if you'll provide more details about your question ;)
21st May 2017, 1:53 PM
¤ rookie ¤
¤ rookie ¤ - avatar
+ 1
here is an example of playing audio using p5.sound library, there's much more to it if you want to mess around (audio analysing, distortion, effects ecc). https://code.sololearn.com/Wor8sh903qdo/?ref=app
21st May 2017, 4:47 PM
seamiki
seamiki - avatar