plugin/radio.js
function Radio (url) {
	var self = this;

	Block.apply(self, arguments);

	self.audio = document.createElement('audio');
	self.audio.autoplay = true;
	self.audio.src = self.url;
	self.node = self.app.context.createMediaElementSource(self.audio);

	self.audio.play();

	//show code in textarea
	self.input = q('input', self.content);
	self.input.value = self.url;

	//update url
	on(self.input, 'change', function () {
		self.audio.src = self.input.value;
	});

	//go ready state
	self.state = 'ready';
}
function Radio (url) {
	var self = this;

	Block.apply(self, arguments);

	self.audio = document.createElement('audio');
	self.audio.autoplay = true;
	self.audio.src = self.url;
	self.node = self.app.context.createMediaElementSource(self.audio);

	self.audio.play();

	//show code in textarea
	self.input = q('input', self.content);
	self.input.value = self.url;

	//update url
	on(self.input, 'change', function () {
		self.audio.src = self.input.value;
	});

	//go ready state
	self.state = 'ready';
}
function Radio ( url ) { var self = this ; Block . apply ( self , arguments ) ; self . audio = document . createElement ( 'audio' ) ; self . audio . autoplay = true ; self . audio . src = self . url ; self . node = self . app . context . createMediaElementSource ( self . audio ) ; self . audio . play ( ) ; //show code in textarea self . input = q ( 'input' , self . content ) ; self . input . value = self . url ; //update url on ( self . input , 'change' , function ( ) { self . audio . src = self . input . value ; } ) ; //go ready state self . state = 'ready' ; }
Create internet radio source based of url passed

@constructor
Create internet radio source based of url passed