WIP: Lots of streaming stuff

This commit is contained in:
2019-11-27 06:51:20 +01:00
parent 710b8a2cdc
commit 6f8683ba9d
11 changed files with 551 additions and 78 deletions

View File

@@ -533,6 +533,7 @@ bool Player::play() {
if (_state == sleeping || _state == recording) _wakeup();
if (_state != idle) return false;
if (_current_playlist == NULL) return false;
if (_current_playlist->get_file_count()==0) return false;
_current_playlist->start();
String file = _current_playlist->get_current_file();
uint32_t position = _current_playlist->get_position();
@@ -547,7 +548,7 @@ void Player::_play_file(String file, uint32_t file_offset) {
_spi->select_sd();
if (file.startsWith("/")) {
_file = new SDDataSource(file);
} else if (file.startsWith("https://")) {
} else if (file.startsWith("http")) {
_file = new HTTPSDataSource(file);
} else {
return;