Add player functionality with HLS support and API integration
- Implemented a new Player class in player.js to handle audio playback, including HLS support using hls.js. - Created a shared API module in api.js for making HTTP requests with proper error handling. - Added DOM utility functions in dom.js for creating and clearing elements. - Introduced WebSocket connection handling in ws.js for real-time updates. - Developed a comprehensive CSS stylesheet for styling the application, including a high-contrast theme.
This commit is contained in:
602
data/seed/stations.json
Normal file
602
data/seed/stations.json
Normal file
@@ -0,0 +1,602 @@
|
||||
[
|
||||
{
|
||||
"slug": "fip",
|
||||
"name": "FIP",
|
||||
"homepage": "https://www.radiofrance.fr/fip",
|
||||
"country": "FR",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"jazz",
|
||||
"rock",
|
||||
"world"
|
||||
],
|
||||
"description": "French public radio mixing jazz, rock, and world music. Ad-free.",
|
||||
"image_url": "https://www.radiofrance.fr/s3/cruiser-production/2022/05/04571615-2745-4f05-829f-e8d22b7ddee0/200x200_fip_ok.jpg",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://icecast.radiofrance.fr/fip-hifi.aac",
|
||||
"format": "aac",
|
||||
"bitrate": 192,
|
||||
"label": "HiFi AAC",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://icecast.radiofrance.fr/fip-midfi.mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "fip"
|
||||
},
|
||||
{
|
||||
"slug": "fip-jazz",
|
||||
"name": "FIP Jazz",
|
||||
"homepage": "https://www.radiofrance.fr/fip/radio-jazz",
|
||||
"country": "FR",
|
||||
"genres": [
|
||||
"jazz"
|
||||
],
|
||||
"description": "Curated jazz in all forms from Radio France.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://icecast.radiofrance.fr/fipjazz-hifi.aac",
|
||||
"format": "aac",
|
||||
"bitrate": 192,
|
||||
"label": "HiFi AAC",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://icecast.radiofrance.fr/fipjazz-midfi.mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "fip"
|
||||
},
|
||||
{
|
||||
"slug": "fip-reggae",
|
||||
"name": "FIP Reggae",
|
||||
"homepage": "https://www.radiofrance.fr/fip/radio-reggae",
|
||||
"country": "FR",
|
||||
"genres": [
|
||||
"reggae",
|
||||
"dub"
|
||||
],
|
||||
"description": "Reggae channel from FIP.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://icecast.radiofrance.fr/fipreggae-hifi.aac",
|
||||
"format": "aac",
|
||||
"bitrate": 192,
|
||||
"label": "HiFi AAC",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://icecast.radiofrance.fr/fipreggae-midfi.mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "fip"
|
||||
},
|
||||
{
|
||||
"slug": "intergalactic-fm",
|
||||
"name": "Intergalactic FM",
|
||||
"homepage": "https://intergalactic.fm/",
|
||||
"country": "NL",
|
||||
"genres": [
|
||||
"electronic",
|
||||
"italo",
|
||||
"electro",
|
||||
"house"
|
||||
],
|
||||
"description": "Cult Den Haag station for varied electronic styles.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "http://radio.intergalactic.fm/1",
|
||||
"format": "mp3",
|
||||
"bitrate": 320,
|
||||
"label": "Channel 1 — Cybernetic Broadcasting",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "http://radio.intergalactic.fm/2",
|
||||
"format": "mp3",
|
||||
"bitrate": 256,
|
||||
"label": "Channel 2 — Disco Fetish",
|
||||
"priority": 1
|
||||
},
|
||||
{
|
||||
"url": "http://radio.intergalactic.fm/3",
|
||||
"format": "mp3",
|
||||
"bitrate": 256,
|
||||
"label": "Channel 3 — The Dream Machine",
|
||||
"priority": 2
|
||||
}
|
||||
],
|
||||
"category": "electronic"
|
||||
},
|
||||
{
|
||||
"slug": "somafm-groove-salad",
|
||||
"name": "SomaFM — Groove Salad",
|
||||
"homepage": "https://somafm.com/groovesalad/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"ambient",
|
||||
"downtempo",
|
||||
"chill"
|
||||
],
|
||||
"description": "A nicely chilled plate of ambient/downtempo beats and grooves.",
|
||||
"image_url": "https://somafm.com/img3/groovesalad-400.jpg",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://ice1.somafm.com/groovesalad-128-mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://ice1.somafm.com/groovesalad-256-mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 256,
|
||||
"label": "MP3 256",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "soma"
|
||||
},
|
||||
{
|
||||
"slug": "somafm-drone-zone",
|
||||
"name": "SomaFM — Drone Zone",
|
||||
"homepage": "https://somafm.com/dronezone/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"ambient",
|
||||
"drone"
|
||||
],
|
||||
"description": "Served best chilled, safe with most medications. Atmospheric textures with minimal beats.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://ice1.somafm.com/dronezone-128-mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://ice1.somafm.com/dronezone-256-mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 256,
|
||||
"label": "MP3 256",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "soma"
|
||||
},
|
||||
{
|
||||
"slug": "somafm-indie-pop-rocks",
|
||||
"name": "SomaFM — Indie Pop Rocks",
|
||||
"homepage": "https://somafm.com/indiepop/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"indie",
|
||||
"pop"
|
||||
],
|
||||
"description": "New and classic favorite indie pop tracks.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://ice1.somafm.com/indiepop-128-mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "soma"
|
||||
},
|
||||
{
|
||||
"slug": "somafm-metal-detector",
|
||||
"name": "SomaFM — Metal Detector",
|
||||
"homepage": "https://somafm.com/metal/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"metal",
|
||||
"doom",
|
||||
"black"
|
||||
],
|
||||
"description": "From black to doom, prog to sludge, thrash to post, stoner to crossover.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://ice1.somafm.com/metal-128-mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "soma"
|
||||
},
|
||||
{
|
||||
"slug": "nts-1",
|
||||
"name": "NTS Radio 1",
|
||||
"homepage": "https://www.nts.live/",
|
||||
"country": "GB",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"underground"
|
||||
],
|
||||
"description": "Underground radio with diverse shows from London and globally — channel 1.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://stream-relay-geo.ntslive.net/stream",
|
||||
"format": "aac",
|
||||
"bitrate": 128,
|
||||
"label": "AAC 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "nts"
|
||||
},
|
||||
{
|
||||
"slug": "nts-2",
|
||||
"name": "NTS Radio 2",
|
||||
"homepage": "https://www.nts.live/",
|
||||
"country": "GB",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"underground"
|
||||
],
|
||||
"description": "NTS — channel 2.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://stream-relay-geo.ntslive.net/stream2",
|
||||
"format": "aac",
|
||||
"bitrate": 128,
|
||||
"label": "AAC 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "nts"
|
||||
},
|
||||
{
|
||||
"slug": "kexp",
|
||||
"name": "KEXP 90.3 FM",
|
||||
"homepage": "https://www.kexp.org/listen/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"indie",
|
||||
"rock",
|
||||
"eclectic"
|
||||
],
|
||||
"description": "Indie rock from Seattle. Features live in-studio sessions.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://kexp.streamguys1.com/kexp160.aac",
|
||||
"format": "aac",
|
||||
"bitrate": 160,
|
||||
"label": "AAC 160",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://kexp.streamguys1.com/kexp128.mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "radio-paradise-main",
|
||||
"name": "Radio Paradise — Main Mix",
|
||||
"homepage": "https://radioparadise.com/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"rock",
|
||||
"world"
|
||||
],
|
||||
"description": "DJ-mixed rock, world, and electronic. Ad-free.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://stream.radioparadise.com/aac-320",
|
||||
"format": "aac",
|
||||
"bitrate": 320,
|
||||
"label": "AAC 320",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://stream.radioparadise.com/mp3-192",
|
||||
"format": "mp3",
|
||||
"bitrate": 192,
|
||||
"label": "MP3 192",
|
||||
"priority": 1
|
||||
},
|
||||
{
|
||||
"url": "https://stream.radioparadise.com/flac",
|
||||
"format": "unknown",
|
||||
"label": "FLAC",
|
||||
"priority": 2
|
||||
}
|
||||
],
|
||||
"category": "starter"
|
||||
},
|
||||
{
|
||||
"slug": "radio-paradise-mellow",
|
||||
"name": "Radio Paradise — Mellow Mix",
|
||||
"homepage": "https://radioparadise.com/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"mellow",
|
||||
"acoustic"
|
||||
],
|
||||
"description": "Mellow acoustic mix.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://stream.radioparadise.com/mellow-320",
|
||||
"format": "aac",
|
||||
"bitrate": 320,
|
||||
"label": "AAC 320",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "starter"
|
||||
},
|
||||
{
|
||||
"slug": "kcrw-eclectic",
|
||||
"name": "KCRW Eclectic 24",
|
||||
"homepage": "https://www.kcrw.com/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"indie"
|
||||
],
|
||||
"description": "Public radio music stream from Santa Monica.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://streams.kcrw.com/e24_aac",
|
||||
"format": "aac",
|
||||
"bitrate": 256,
|
||||
"label": "AAC 256",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://streams.kcrw.com/e24_mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 192,
|
||||
"label": "MP3 192",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "dublab",
|
||||
"name": "dublab",
|
||||
"homepage": "https://dublab.com/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"experimental",
|
||||
"underground"
|
||||
],
|
||||
"description": "Non-profit community collective for experimental and underground music.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://dublab.out.airtime.pro/dublab_a",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "wfmu",
|
||||
"name": "WFMU",
|
||||
"homepage": "https://wfmu.org/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"freeform",
|
||||
"eclectic"
|
||||
],
|
||||
"description": "Freeform radio from New Jersey; independent and non-commercial.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://wfmu.org/wfmu.pls",
|
||||
"format": "pls",
|
||||
"label": "Main (PLS)",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "bbc-radio-6-music",
|
||||
"name": "BBC Radio 6 Music",
|
||||
"homepage": "https://www.bbc.co.uk/sounds/play/live:bbc_6music",
|
||||
"country": "GB",
|
||||
"genres": [
|
||||
"alternative",
|
||||
"eclectic"
|
||||
],
|
||||
"description": "Alternative music, new releases, and deep cuts.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "http://as-hls-ww-live.akamaized.net/pool_81827798/live/ww/bbc_6music/bbc_6music.isml/bbc_6music-audio%3d320000.norewind.m3u8",
|
||||
"format": "hls",
|
||||
"bitrate": 320,
|
||||
"label": "HLS 320",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "http://as-hls-ww-live.akamaized.net/pool_81827798/live/ww/bbc_6music/bbc_6music.isml/bbc_6music-audio%3d128000.norewind.m3u8",
|
||||
"format": "hls",
|
||||
"bitrate": 128,
|
||||
"label": "HLS 128",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "bbc"
|
||||
},
|
||||
{
|
||||
"slug": "worldwide-fm",
|
||||
"name": "Worldwide FM",
|
||||
"homepage": "https://worldwidefm.net/",
|
||||
"country": "GB",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"jazz",
|
||||
"world"
|
||||
],
|
||||
"description": "Platform for underground music and culture.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://worldwide-fm.radiocult.fm/stream",
|
||||
"format": "mp3",
|
||||
"bitrate": 320,
|
||||
"label": "MP3 320",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://worldwidefm.out.airtime.pro/worldwidefm_b",
|
||||
"format": "mp3",
|
||||
"bitrate": 192,
|
||||
"label": "MP3 192",
|
||||
"priority": 1
|
||||
},
|
||||
{
|
||||
"url": "http://worldwidefm.out.airtime.pro:8000/worldwidefm_a",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 2
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "nightwave-plaza",
|
||||
"name": "Nightwave Plaza",
|
||||
"homepage": "https://plaza.one/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"vaporwave",
|
||||
"future-funk",
|
||||
"city-pop"
|
||||
],
|
||||
"description": "24/7 vaporwave, future funk, and city pop.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://radio.plaza.one/mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 192,
|
||||
"label": "MP3 192",
|
||||
"priority": 0
|
||||
},
|
||||
{
|
||||
"url": "https://radio.plaza.one/ogg",
|
||||
"format": "ogg",
|
||||
"bitrate": 192,
|
||||
"label": "OGG 192",
|
||||
"priority": 1
|
||||
}
|
||||
],
|
||||
"category": "electronic"
|
||||
},
|
||||
{
|
||||
"slug": "wwoz",
|
||||
"name": "WWOZ 90.7 New Orleans",
|
||||
"homepage": "https://www.wwoz.org/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"jazz",
|
||||
"funk",
|
||||
"soul",
|
||||
"blues"
|
||||
],
|
||||
"description": "New Orleans jazz, funk, and soul.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://wwoz-sc.streamguys1.com/wwoz-hi.mp3",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "jazz"
|
||||
},
|
||||
{
|
||||
"slug": "kiosk-radio",
|
||||
"name": "Kiosk Radio Brussels",
|
||||
"homepage": "https://kioskradio.com/",
|
||||
"country": "BE",
|
||||
"genres": [
|
||||
"electronic",
|
||||
"jazz",
|
||||
"eclectic"
|
||||
],
|
||||
"description": "Electronic and jazz from a park wooden shack in Brussels.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://kioskradiobxl.out.airtime.pro/kioskradiobxl_a",
|
||||
"format": "mp3",
|
||||
"bitrate": 192,
|
||||
"label": "MP3 192",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "le-mellotron",
|
||||
"name": "Le Mellotron",
|
||||
"homepage": "https://www.lemellotron.com/",
|
||||
"country": "FR",
|
||||
"genres": [
|
||||
"eclectic",
|
||||
"electronic",
|
||||
"soul"
|
||||
],
|
||||
"description": "Parisian station with eclectic tastes.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://listen.radioking.com/radio/477719/stream/534044",
|
||||
"format": "mp3",
|
||||
"bitrate": 128,
|
||||
"label": "MP3 128",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
},
|
||||
{
|
||||
"slug": "the-lot-radio",
|
||||
"name": "The Lot Radio",
|
||||
"homepage": "https://www.thelotradio.com/",
|
||||
"country": "US",
|
||||
"genres": [
|
||||
"electronic",
|
||||
"underground"
|
||||
],
|
||||
"description": "Independent hub streaming from a Brooklyn shipping container.",
|
||||
"streams": [
|
||||
{
|
||||
"url": "https://livepeercdn.studio/hls/85c28sa2o8wppm58/index.m3u8",
|
||||
"format": "hls",
|
||||
"label": "HLS",
|
||||
"priority": 0
|
||||
}
|
||||
],
|
||||
"category": "underground"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user