In my Deezer InApp, when I call the DZ.player.playAlbum method with a non-zero offset, e.g. DZ.player.playAlbum(10008268, true, 0, 13), the playback starts at the given offset on the Deezer desktop site, but in the mobile apps (both Android and iOS) the playback starts from the beginning. Is the offset not supported on mobile? Is there any workaround solution? This would be an important feature for me to have.
Deezer Javascript SDK playAlbum offset ignored on mobile
108 Views Asked by peruukki At
1
I found a workaround based on
DZ.player.seekthat seems to work on Android, but it won't work on iOS until receiving player_position events works on iOS:Listening for
player_positionevents is needed because callingDZ.player.seekseems to have no effect if the player position is 0. Also, I need to usesetTimeoutfor unsubscribing outside of the callback function, otherwise I get an exception.