mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 10:15:31 +00:00
Clarify current track API to note that it changes the track but does not actually cause it to play
This commit is contained in:
parent
525e17ed2c
commit
bc33e18ca0
1 changed files with 7 additions and 2 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue