Support HLS remote URLs.

This commit is contained in:
Buster "Silver Eagle" Neece 2022-06-05 03:46:32 -05:00
parent 64e7a81083
commit c7cfa2d00a
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 10 additions and 2 deletions

View File

@ -32,6 +32,8 @@ release channel, you can take advantage of these new features and fixes.
- Streamers/DJs can have custom artwork uploaded for each streamer; during the streamer's broadcasts, if no other album
art is available, the streamer's artwork will appear as the cover art instead.
- You can now customize the compression used for automatic backups.
## Code Quality/Technical Changes
- We can now write custom Nginx configuration on a per-station basis and automatically reload it on-the-fly without
@ -56,6 +58,8 @@ release channel, you can take advantage of these new features and fixes.
- Playlists powered by remote stream URLs will once again work as expected. Note that these playlist types _must_ be
scheduled, as otherwise their indefinite duration will cause problems with radio operation.
- Remote URL playlists will now also support HLS (.m3u8) URLs.
- A bug preventing SFTP from properly supporting SSH public keys has been fixed.
- A minor security issue where SFTP would not properly disable if a station switched storage locations to a non-local

View File

@ -330,8 +330,12 @@ class ConfigWriter implements EventSubscriberInterface
$buffer = $playlist->getRemoteBuffer();
$buffer = ($buffer < 1) ? Entity\StationPlaylist::DEFAULT_REMOTE_BUFFER : $buffer;
$playlistConfigLines[] = $playlistVarName . ' = mksafe(buffer(buffer=' . $buffer . '., input.http(max_buffer=' . $buffer . '., "'
. self::cleanUpString($remote_url) . '")))';
$inputFunc = (str_ends_with($remote_url, 'm3u8'))
? 'input.hls'
: 'input.http';
$playlistConfigLines[] = $playlistVarName . ' = mksafe(buffer(buffer=' . $buffer . '., '
. $inputFunc . '("' . self::cleanUpString($remote_url) . '")))';
if (0 === $scheduleItems->count()) {
// We cannot play unscheduled remote URL playlists.