+ 2

embed tags don't work :(

I was trying to add background music to my webpage but it doesn't work. Can you please tell me why it doesn't work and how to fix it? https://sololearn.com/compiler-playground/WgkIPa6gLhh8/?ref=app

6th Nov 2024, 10:51 PM
♬Astro-GingyFlake🇹🇷
♬Astro-GingyFlake🇹🇷 - avatar
5 Antworten
+ 5
This is one of the most simplest audio loader I've written. Tested on Android 14, chrome 136, IOS 14 and Firefox. https://sololearn.com/compiler-playground/WYZnXqraDK4k/?ref=app
7th Nov 2024, 3:00 AM
RuntimeTerror
RuntimeTerror - avatar
+ 3
1. Embed is deprecated for <audio> 2. Audio files poses security risk and depending on your device, you need to load them differently
7th Nov 2024, 2:51 AM
RuntimeTerror
RuntimeTerror - avatar
+ 3
how about this? https://sololearn.com/compiler-playground/W5ee7P0wgO7D/?ref=app RuntimeTerror's code works in my Sololearn Android app. Same as with his code, you have to tap or click the page in order to play the audio. Sometimes it takes two clicks, though.
7th Nov 2024, 4:22 AM
Bob_Li
Bob_Li - avatar
+ 2
I am using IPhone 12 and it doesn't work 😭
7th Nov 2024, 3:14 AM
♬Astro-GingyFlake🇹🇷
♬Astro-GingyFlake🇹🇷 - avatar
0
No, it doesn't work on my IPhone, and the vibrate div glitches
7th Nov 2024, 12:47 PM
♬Astro-GingyFlake🇹🇷
♬Astro-GingyFlake🇹🇷 - avatar