Question

When DZ.getLoginStatus() returns response.status: 'unknown' I know the user will get the 30s preview because the user is then not logged-in to Deezer at all. However, when the user is logged-in but has a Discovery Premium account, how do I detect that the user will get the 30s preview? response.status = 'not_authorized' tells the user did not add the app to Deezer, but it does not explain the 30s preview right?

Was it helpful?

Solution

Found a solution. The player_position event also passes the length of the current track. In this case it says 30. So when the first player_position fires and the length in this event is 30 seconds AND different from the duration of the track metadata I have to apply the offset as explained here: What is the offset of the 30s Deezer previews?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top