Below is a list of player control methods you have access in your application
| Function | Params | Description |
|---|---|---|
| DZ.player.play | Start playing | |
| DZ.player.pause | Stop playing | |
| DZ.player.next | Start playing next track | |
| DZ.player.prev | Start playing previous track | |
| DZ.player.seek | int [0, 100] | Seek to % of the track |
| DZ.player.setVolume | int [0, 100] | Setting the volume (%) |
| DZ.player.setMute | boolean | Mutes the volume |
| DZ.player.setShuffle | boolean | Tells the player to toggle shuffling the current track list |
| DZ.player.setRepeat | int {0, 1, 2} |
0: no repeat 1: repeat all 2: repeat one |
| DZ.player.changeTrackOrder | array of track ids | Set a new order for the current track list This method does not allow you to add new tracks! see DZ.player.addToQueue in the load tracks section |
| boolean, object | If first arg is true, hide current track info and track list (blind test mode). If false, revert to normal mode. If true, second argument is an options object: {
title: 'myReplacedTitle',
artist: 'myReplacedArtistName',
cover: 'myReplacedCoverUrl'
}
|