Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
At the moment this library can only play content from insecure HTTP sources, but it'd be awesome to see it play HTTPS as well since HTTPS-only sources are becoming more and more common.
I got HTTPS to work for myself by using WiFiClientSecure in AudioFileSourceHTTPStream.h and setting the right root ca (or you can do client.setInsecure()) in AudioFileSourceHTTPStream.cpp. I imagine this isn't the best way to go about things, hence the issue and not a PR, but it works great for me.
Perhaps it could also make sense to instead let the user provide their own WiFiClient along the lines of file = new AudioFileSourceHTTPStream(URL, client); so that the user can use their own WiFiClientSecure and root ca instead of delegating this to the audio library.
At the moment this library can only play content from insecure HTTP sources, but it'd be awesome to see it play HTTPS as well since HTTPS-only sources are becoming more and more common.
I got HTTPS to work for myself by using
WiFiClientSecure
inAudioFileSourceHTTPStream.h
and setting the right root ca (or you can doclient.setInsecure()
) inAudioFileSourceHTTPStream.cpp
. I imagine this isn't the best way to go about things, hence the issue and not a PR, but it works great for me.Perhaps it could also make sense to instead let the user provide their own WiFiClient along the lines of
file = new AudioFileSourceHTTPStream(URL, client);
so that the user can use their own WiFiClientSecure and root ca instead of delegating this to the audio library.