-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
208 lines (196 loc) · 12 KB
/
index.html
File metadata and controls
208 lines (196 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>Radio Stream Player</title>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T93274MPPZ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-T93274MPPZ');
</script>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="tool-header">
<h2>Radio Stream Player</h2>
<button id="settings-btn" class="theme-btn" aria-label="Open Settings" style="margin-left: auto;">
<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
<path
d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L3.16 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.04.24.24.41.48.41h3.84c.24 0 .43-.17.47-.41l.36-2.54c.59-.24 1.13-.57 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" />
</svg>
</button>
</header>
<main class="main-content">
<div class="radiostream-player">
<div class="vu-meters">
<div class="vu-meter" id="left-vu"></div>
<div class="vu-meter" id="right-vu"></div>
</div>
<div class="player-content">
<div class="now-playing-container">
<div class="now-playing-label" id="now-playing-station">Now Playing: ETN-FM Trance</div>
<div class="now-playing-track-wrapper">
<div class="now-playing-track" id="now-playing-track">Loading stream...</div>
</div>
</div>
<div class="control-bar">
<div class="station-selector">
<select id="station-select" aria-label="Select Station"></select>
<button id="favorite-btn" class="console-btn icon-only" aria-label="Toggle Favorite"
title="Add to Favorites">
<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
<path
d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" />
</svg>
</button>
</div>
<button class="console-btn" id="play-pause-btn" aria-label="Play or pause audio stream">
<svg class="icon icon-play" viewBox="0 0 24 24" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path d="M8 5v14l11-7z" />
</svg>
<svg class="icon icon-pause" viewBox="0 0 24 24" fill="currentColor"
xmlns="http://www.w3.org/2000/svg" style="display: none;">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />
</svg>
</button>
<div class="volume-control">
<input type="range" id="volume-slider" min="0" max="1" step="0.01" value="0.5"
aria-label="Volume control">
</div>
<button class="console-btn" id="popout-btn" aria-label="Open player in a new pop-out window">
<svg class="icon icon-popout" viewBox="0 0 24 24" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path
d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" />
</svg>
</button>
</div>
<div class="popout-notice" id="popout-notice" style="display: none;">
Player is running in a pop-out window.
</div>
</div>
</div>
</main>
<!-- Settings Modal -->
<div id="settings-modal" class="settings-modal" style="display: none;">
<div class="settings-content">
<div class="settings-header">
<h3>Settings</h3>
<button id="close-settings-btn" class="close-btn">×</button>
</div>
<div class="settings-tabs">
<button class="settings-tab-btn active" data-tab="general-tab">General</button>
<button class="settings-tab-btn" data-tab="custom-tab">My Stations</button>
<button class="settings-tab-btn" data-tab="directory-tab">Directory</button>
</div>
<div class="settings-body">
<!-- General Settings Tab -->
<div id="general-tab" class="settings-tab-content active">
<div class="setting-item">
<label for="theme-select">Theme</label>
<select id="theme-select">
<option value="light-theme">Light</option>
<option value="dark-theme">Dark</option>
</select>
</div>
<div class="setting-item">
<div class="setting-checkbox">
<input type="checkbox" id="favorites-only-check">
<label for="favorites-only-check">Show Favorites Only</label>
</div>
<label for="genre-select">Filter by Genre</label>
<select id="genre-select">
<option value="all">All Genres</option>
</select>
</div>
<div class="setting-item">
<label for="vu-style-select">Visualizer Style</label>
<select id="vu-style-select">
<!-- Options populated by settings.js -->
</select>
</div>
<div class="setting-item">
<label>Personalization</label>
<div class="bg-presets-label">Presets</div>
<div id="bg-presets-container"></div>
<div style="display: flex; gap: 10px;">
<input type="url" id="bg-url-input" class="settings-input"
placeholder="Background Image URL" style="margin-bottom: 0;">
<button id="set-bg-btn" class="console-btn"
style="padding: 5px 15px; white-space: nowrap;">Set</button>
<button id="clear-bg-btn" class="console-btn"
style="padding: 5px 15px; white-space: nowrap; background-color: var(--border-color); color: var(--text-color);">Clear</button>
</div>
</div>
<div class="setting-item">
<label>Community & Feedback</label>
<div style="display: flex; flex-direction: column; gap: 8px;">
<a href="https://github.com/BrainAV/Radio-Stream-Player/issues/new?title=Station+Suggestion&body=Name:+%0AURL:+%0AGenre:+"
target="_blank" class="settings-link">Suggest a New Station</a>
<a href="https://github.com/BrainAV/Radio-Stream-Player/issues/new?title=Broken+Stream+Report&body=Station+Name:+"
target="_blank" class="settings-link">Report a Broken Stream</a>
</div>
</div>
</div>
<!-- Custom Stations Tab -->
<div id="custom-tab" class="settings-tab-content" style="display: none;">
<div class="setting-item">
<label>Manage Favorites</label>
<p class="settings-description"
style="font-size: 0.9em; margin-bottom: 5px; color: var(--text-color); opacity: 0.8;">Click
the star icon in the main player to add favorites.</p>
<div id="favorites-list" class="custom-stations-list" style="margin-bottom: 20px;"></div>
</div>
<hr style="border: 0; border-top: 1px solid var(--border-color); margin-bottom: 20px;">
<div class="setting-item">
<label>Manage Custom Stations</label>
<div id="custom-stations-list" class="custom-stations-list"></div>
<input type="text" id="custom-station-name" class="settings-input" placeholder="Station Name">
<input type="text" id="custom-station-genre" class="settings-input"
placeholder="Genre (Optional)">
<div style="display: flex; gap: 10px;">
<input type="url" id="custom-station-url" class="settings-input"
placeholder="Stream URL (https://...)" style="margin-bottom: 0;">
<button id="add-station-btn" class="console-btn"
style="padding: 5px 15px; white-space: nowrap;">Add</button>
</div>
</div>
</div>
<!-- Directory Search Tab -->
<div id="directory-tab" class="settings-tab-content" style="display: none;">
<div class="setting-item">
<label>Radio Browser Directory</label>
<p class="settings-description"
style="font-size: 0.9em; margin-bottom: 10px; color: var(--text-color);">Search tens of
thousands of community-driven radio stations.</p>
<div class="directory-search-container" style="display: flex; gap: 10px; margin-bottom: 15px;">
<select id="rb-search-by" class="settings-input" style="flex: 0 0 30%; margin-bottom: 0;">
<option value="tag">Genre / Tag</option>
<option value="name">Name</option>
<option value="country">Country</option>
</select>
<input type="text" id="rb-search-input" class="settings-input" placeholder="Search..."
style="flex: 1; margin-bottom: 0;">
<button id="rb-search-btn" class="console-btn" style="padding: 5px 15px;">Search</button>
</div>
<div id="rb-results-container" class="rb-results-container"
style="max-height: 300px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; background: rgba(0,0,0,0.1);">
<div class="rb-empty-state"
style="text-align: center; color: var(--text-color); opacity: 0.7; padding: 20px;">
Enter a search term above to find new stations.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="module" src="script.js"></script>
<script type="module" src="settings.js"></script>
</body>
</html>