I am trying to create a simple audio player that will work in iOS for use with iPhone and iPad.
The audio is obtained from base64 encoded data (which I created using PHP base64 encoding function).
Here is my code below:
<audio controls="controls" autobuffer="autobuffer" autoplay="autoplay">
<source src="data:audio/ogg;base64,{my_base64_data}" />
</audio>
However, this works in Firefox, but it doesn’t work in Safari.
Is there something I’m doing wrong?
Kindly assist.
Thanks.
Ok, I managed to solve this.
I simply created an mp4 alternative to the ogg, encoded to base64, and added another source tag with the raw base64 data.
Seems to be working without any issues so far.