com.surfernetwork.audiometadata
v1.0.0
Published
PhoneGap Live Audio Stream Metadata
Downloads
3
Maintainers
Readme
AudioMetadata
This plugin will extract Artist and Title metadata from an url of a live MP3 http audio stream in form of json.
Install
Assuming PhoneGap CLI is installed, from the command line.
phonegap local plugin add https://github.com/shahidj/AudioMetadata
PhoneGap Build
Add the following xml to your config.xml to always use the latest version of this plugin:
<gap:plugin name="com.surfernetwork.audiometadata" />
or to use an specific version:
<gap:plugin name="com.surfernetwork.audiometadata" version="1.0.0" />
More informations can be found here https://build.phonegap.com/plugins/ .
How to Use
It supports Phonegap 3.0 and above
This plugin will pass stream url and will retun metadata in form a json object.
From index.js you may call plugin by passing parameters.
var returnSuccess='success';
var StreamUrl='http://url:port/stationid';
var success = function(result) {
console.log("Artist:"+result.Artist );
console.log("Title:"+result.Title );
};
var error = function(error) {
console.error("ERROR: \r\n"+error );
};
AudioMetadata.callNativeFunction(success, error,{'result':returnSuccess,'streamurl':StreamUrl});