Files
Atomcms-edit/app/Enums/RadioSettings.php
T
root 0c6c558a59 Add radio embed widget, SSE real-time, song history, moderation panel, and Auto DJ
- Embed widget: standalone iframe player with dark/light/transparent themes, copy-paste embed code admin page
- Real-time SSE: streaming now-playing/listeners/dj events, replaces polling in radio-player and embed
- Song history: auto-records song changes to radio_song_plays table, Filament resource to view
- DJ moderation: unified panel for shouts approval, song request queue, DJ applications
- Auto DJ: playlist management with round-robin playback when no DJ is live
- Refactored radio-player Alpine component to use EventSource API with auto-reconnect
2026-05-24 14:07:32 +02:00

58 lines
2.4 KiB
PHP
Executable File

<?php
namespace App\Enums;
enum RadioSettings: string
{
case Enabled = 'radio_enabled';
case StreamUrl = 'radio_stream_url';
case CurrentDjId = 'radio_current_dj_id';
case Style = 'radio_style';
case ShoutsEnabled = 'radio_shouts_enabled';
case ApplicationsEnabled = 'radio_applications_enabled';
case NowPlayingEnabled = 'radio_now_playing_enabled';
case NowPlayingApiUrl = 'radio_now_playing_api_url';
case ListenersEnabled = 'radio_listeners_enabled';
case ListenersApiUrl = 'radio_listeners_api_url';
case AzureCastBaseUrl = 'radio_azurecast_base_url';
case AzureCastStationId = 'radio_azurecast_station_id';
case ShowCurrentDj = 'radio_show_current_dj';
case WidgetEnabled = 'radio_widget_enabled';
case WidgetShowGlobally = 'radio_widget_show_globally';
case WidgetPosition = 'radio_widget_position';
case EmbedEnabled = 'radio_embed_enabled';
case EmbedAllowedDomains = 'radio_embed_allowed_domains';
case EmbedTheme = 'radio_embed_theme';
case EmbedHeight = 'radio_embed_height';
case EmbedWidth = 'radio_embed_width';
case EmbedAutoPlay = 'radio_embed_auto_play';
public function label(): string
{
return match ($this) {
self::Enabled => 'Radio Enabled',
self::StreamUrl => 'Stream URL',
self::CurrentDjId => 'Current DJ ID',
self::Style => 'Radio Style',
self::ShoutsEnabled => 'Shouts Enabled',
self::ApplicationsEnabled => 'Applications Enabled',
self::NowPlayingEnabled => 'Now Playing Enabled',
self::NowPlayingApiUrl => 'Now Playing API URL',
self::ListenersEnabled => 'Listeners Enabled',
self::ListenersApiUrl => 'Listeners API URL',
self::AzureCastBaseUrl => 'AzureCast Base URL',
self::AzureCastStationId => 'AzureCast Station ID',
self::ShowCurrentDj => 'Show Current DJ',
self::WidgetEnabled => 'Widget Enabled',
self::WidgetShowGlobally => 'Widget Show Globally',
self::WidgetPosition => 'Widget Position',
self::EmbedEnabled => 'Embed Enabled',
self::EmbedAllowedDomains => 'Embed Allowed Domains',
self::EmbedTheme => 'Embed Theme',
self::EmbedHeight => 'Embed Height',
self::EmbedWidth => 'Embed Width',
self::EmbedAutoPlay => 'Embed Auto Play',
};
}
}