Search code examples
javascriptapideezer

Deezer API: check if the current user has the 30-seconds streaming limit


is there a way, for a web application, to check if the current user has the 30-seconds streaming limit or not?

It can happen in two cases:

  • the user is not logged
  • the user is logged but his account doesn't allow the full streaming from an external web application (I guess this second case can be just a free user over his first 6 months subscription period).

Thanks.


Solution

  • I have found an hack for this:

    DZ.Event.subscribe('player_position', function(arg){
    if (arg[1] == 30 ){
    alert('limit 30 secs');
    });
    

    pay attention because at the beginning of the song, for some reason, arg[1] is 0