npm

Need private packages and team management tools?Check out npm Orgs. »

com.surfernetwork.audiometadata

1.0.0 • Public • Published

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}); 

install

npm i com.surfernetwork.audiometadata

Downloadsweekly downloads

6

version

1.0.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability