Skip to content

copeus/Cordova-Plugin-Deezer-IOS-ANDROID

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N|Solid

Installation

At first you must registering you application with [deezer] PlDb

From master

cordova plugin add https://github.com/jeweller1980stepanets/Cordova-Plugin-Deezer-IOS-ANDROID

Removing the Plugin from project

cordova plugin rm com.procoders.deezer

Supported Platforms

  • Android
  • iOS

Using the plugin

You must have premium account from Deezer servise for playing music

After device is ready you must:

var deezerCordova = window.cordova.plugins.DeezerPlugin;

After this you may use all method in code.

Methods

All methods returning promises, but you can also use standard callback functions.

deezerCordova.init(onSuccess, onError,appId);
deezerCordova.login(onSuccess, onError);
deezerCordova.playTrack(onSuccess, onError,trackId);
deezerCordova.playAlbum(onSuccess, onError,albumId);
deezerCordova.playPlaylist(onSuccess, onError,playlistId);
deezerCordova.playRadio(onSuccess, onError,radioId);
deezerCordova.play();
deezerCordova.pause();
deezerCordova.next();
deezerCordova.prev();
deezerCordova.seek(position);//value between 0 - 100%
deezerCordova.logout();
deezerCordova.setVolume(val1,val2);//val1,val2 - the volume for the left and right channel (between 0-100%)

for iOS platform not implemented method setVolume() and event on_chenge_volume() It will be fixed when this methods will be in Deezer SDK

Events

on_position : function(args){},//args[0] - position, args[1] - duration
on_buffering : function (args){},//(args[0] * 100) + " %";
on_current_track : function(arg){},//arg[1] - Title of track
on_player_play : function(){},
on_track_ended : function(){},
on_pause : function(){},
on_change_volume : function(args){}//args[0] - the volume for the left channel (between 0 and 100%), args[1] -  the volume for the right channel (between 0 and 100%)

Exemle for subscribe:

deezerCordova.Events.on_position = function(args){..`code`..}

N|Solid

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Objective-C 72.9%
  • Java 24.5%
  • JavaScript 2.6%