InsanityRadio / web-player

Insanity's HTML5 web player.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web Player

This is a Cordova-based application for playing an Icecast stream.

Specifically, Cordova-TypeScript-WebPack.

Modifying

At some point all the configuration options will be moved to a single file. Until this is the case, you have to go diving for the stream URL etc.

The stream URL is in player.ts, and the metadata URL is in metadata.ts and radio.ts.

Installation

Firstly, npm install to install all the node modules you need.

Run webpack. Then copy the www directory to your web server.

Metadata

There are currently two metadata libraries. The first is plain JSON (name InsanityAPI) that looks like this:

{
	"nowPlaying": {
		"song": "Mr. Brightside",
		"artist": "The Killers",
		"external_id": 24716739,
		"nerve_id": 7084,
		"album_art": "https://i.scdn.co/image/ac68a9e4a867ec3ce8249cd90a2d7c73755fb487" | null,
		"external_urls": {
			"spotify": "https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp"
		} | null
	},
	"currentShow": {
		"dayOfTheWeek": "friday",
		"showName": "Best Of The Playlist",
		"showPresenters": "Insanity Radio"
	},
	"now": "2017-04-28T00:45:14+0100"
}

external_id and nerve_id can be empty or missing - they're Insanity-specific metadata.

The second is InsanityStreamAPI. That uses Nchan (an NGINX module) that can push realtime updates to thousands of clients at a time. Individual data chunks are the same format as above.

About

Insanity's HTML5 web player.

License:MIT License


Languages

Language:JavaScript 31.5%Language:Java 28.5%Language:Objective-C 28.4%Language:C# 5.5%Language:C++ 2.0%Language:TypeScript 1.2%Language:CSS 1.1%Language:Batchfile 1.0%Language:HTML 0.7%Language:Shell 0.1%