Skip to content

Commit

Permalink
Clarify current track API to note that it changes the track but does …
Browse files Browse the repository at this point in the history
…not actually cause it to play
  • Loading branch information
captbaritone committed Aug 25, 2024
1 parent 525e17e commit bc33e18
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/webamp/js/webampLazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,14 @@ class Webamp {
}

/**
* Play a specific track by index
* Set the current track a specific track in the playlist by zero-based index.
*
* Note: If Webamp is currently playing, the track will begin playing. If
* Webamp is not playing, the track will not start playing. You can use
* `webamp.pause()` before calling this method or `webamp.play()` after
* calling this method to control whether the track starts playing.
*/
playTrack(index: number): void {
setCurrentTrack(index: number): void {
this.store.dispatch(Actions.playTrack(index));
}

Expand Down

0 comments on commit bc33e18

Please sign in to comment.