javascript - Spotify app - preview 10 seconds of track then skip -
i'm making spotify app, imports playlists, , gives option of previewing playlist, you'd able press play button, work through playlist, playing 10 seconds of track skipping next
i've got playlist integration sorted, struggling know start on preview button, ideas?
edit:
should have been more specific
i wanted preview last 30 seconds of track, need find duration (which problem lies) bring 30 seconds , play 10 seconds before skipping
perhaps or misunderstanding?
function onplaybuttonclick() { playthetrack(); settimeout(playnexttrack, 10000); } or recursively:
function playtrack(tracknumber) { stopcurrenttrack(); playthistrack(); settimeout(function() { playtrack(++tracknumber); }, 10000); }
Comments
Post a Comment