diff options
Diffstat (limited to 'src/js/player.js')
-rw-r--r-- | src/js/player.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/js/player.js b/src/js/player.js index 1ccdb1d..b31c2c6 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -64,8 +64,12 @@ export function init(node) { }); } -export function play() { - mediaplayer.play(); +export function play(trackIndex) { + if( trackIndex ) { + mediaplayer.pickTrack(trackIndex); + } else { + mediaplayer.play(); + } } export function pause() { |