V
V
Vadim_Sabirov2021-07-29 22:54:31
React
Vadim_Sabirov, 2021-07-29 22:54:31

Why doesn't the audio tag work on mobile devices?

I download audio from the server, convert them to blobs, which I then convert to URL.createObjectUrl links and put them in the source tag. Everything works fine on desktop. In mobile devices, the play button does not work from standard controllers, that is, it does not start audio.
Since I am writing in react, I tried to use the AudioPlayer from the react-modular-audio-player package .
I did it in the same way, I threw my blobs into the array of tracks - it works on the desktop, not on mobile phones. Went further. In my array of tracks I threw the same link that was in the example on their page - the same result.
What is most interesting, on their website from a mobile phone, the track is included, although the props in the component were the same, and the link was the same.
Why might this happen? And most importantly - how do I play audio on a mobile phone?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question