Skip to content

Commit

Permalink
feat: Added NPO Radio 1, NPO Klassiek, FunX
Browse files Browse the repository at this point in the history
  • Loading branch information
janyksteenbeek committed Dec 26, 2023
1 parent f2e713a commit 3fcca1c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,19 @@ After that, the server is available on port 8080.

The following streams are available:

- `/nporadio2.m3u8` - M3U8 stream with FairPlay DRM (HLS)
- `/nporadio2.mpd` - MPEG-DASH stream with Widevine DRM (DASH)
- `/npo3fm.m3u8` - M3U8 stream with FairPlay DRM (HLS)
- `/npo3fm.mpd` - MPEG-DASH stream with Widevine DRM (DASH)
| URL | Station | Format | DRM Type |
|---------------------|--------------|------------------|---------------------|
| `/nporadio1.m3u8` | NPO Radio 1 | M3U8 stream | FairPlay DRM (HLS) |
| `/nporadio1.mpd` | NPO Radio 1 | MPEG-DASH stream | Widevine DRM (DASH) |
| `/nporadio2.m3u8` | NPO Radio 2 | M3U8 stream | FairPlay DRM (HLS) |
| `/nporadio2.mpd` | NPO Radio 2 | MPEG-DASH stream | Widevine DRM (DASH) |
| `/npo3fm.m3u8` | NPO 3FM | M3U8 stream | FairPlay DRM (HLS) |
| `/npo3fm.mpd` | NPO 3FM | MPEG-DASH stream | Widevine DRM (DASH) |
| `/npoklassiek.m3u8` | NPO Klassiek | M3U8 stream | FairPlay DRM (HLS) |
| `/npoklassiek.mpd` | NPO Klassiek | MPEG-DASH stream | Widevine DRM (DASH) |
| `/funx.m3u8` | FunX | M3U8 stream | FairPlay DRM (HLS) |
| `/funx.mpd` | FunX | MPEG-DASH stream | Widevine DRM (DASH) |



## Environment variables
Expand Down
14 changes: 10 additions & 4 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ const (
)

var routeConfigs = map[string]RouteConfig{
"/nporadio2.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.nporadio2.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/nporadio2.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.nporadio2.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/npo3fm.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.npo3fm.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/npo3fm.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.npo3fm.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/nporadio1.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.nporadio1.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/nporadio1.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.nporadio1.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/nporadio2.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.nporadio2.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/nporadio2.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.nporadio2.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/npo3fm.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.npo3fm.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/npo3fm.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.npo3fm.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/npoklassiek.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.nporadio4.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/npoklassiek.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.nporadio4.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/funx.m3u8": {DrmType: "fairplay", ProfileName: "hls", URL: "https://www.funx.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
"/funx.mpd": {DrmType: "widevine", ProfileName: "dash", URL: "https://www.funx.nl/live", StreamBuilderURL: "https://prod.npoplayer.nl/stream-link"},
}

var cachedUrls = make(map[string]CachedStreamUrl)
Expand Down

0 comments on commit 3fcca1c

Please sign in to comment.