Return shape for the usePlayer hook — controls audio playback of a SoundCloud track.
const player = usePlayer(trackId);player.toggle(); // play or pauseplayer.seek(30); // jump to 30 seconds Copy
const player = usePlayer(trackId);player.toggle(); // play or pauseplayer.seek(30); // jump to 30 seconds
usePlayer
Total track duration in seconds.
Pause playback.
Start playback.
Whether audio is currently playing.
Current playback position in seconds.
Seek to a specific time in seconds.
Toggle between play and pause.
Return shape for the usePlayer hook — controls audio playback of a SoundCloud track.
Example
See
usePlayer