+ 1

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
4 Respuestas
+ 1
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
+ 1
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
+ 1
I am using IPhone 12 and it doesn't work 😭
7th Nov 2024, 3:14 AM
♬Astro-GingyFlake🇹🇷
♬Astro-GingyFlake🇹🇷 - avatar
0
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