I have an html webserver that is running on an esp32 and on that html i need play an audio file. the audio file is stored in an SD card that is connected to the ESP32
how do i pass this audio file to the browser?
in the browser i have this
<audio controls autoplay>
<source src=" http://192.168.4.1/background1.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
and in the esp server
server.on("/background1", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SD, "/background1.mp3", "audio/mpeg");
});
The mp3 file is on the sd card, and its filename is background1.mp3. but the browser is not able to play the mp3