close
The Wayback Machine - https://web.archive.org/web/20140813143820/https://developer.beatsmusic.com/docs/read/web_playback_api/Properties

Properties

The following are getters and setters available on the BAM instance.

clientId

Sets the Beats Music developer client api key.

authentication

Sets the Beats Music access token.

identifier

Sets the Beats Music track ID to be played.

volume

Gets and sets the volume. Valid values are 0-1.

seekable

Getter returns a timerange object containing the start, end and length of the seekable range of the current track in seconds.

Example:

{ 
     start:0, 
     end:4.7, 
     length:4.7 
}

 

buffered

Getter returns a timerange object containing the start, end, and length of the buffered range of the current track in seconds.

Example:

{ 
     start:5.0, 
     end:14.7, 
     length:9.7 
}

 

paused

Get and sets the paused state of playback as a boolean.

muted

Gets and sets the mute state of the current track as a boolean.

loop

Gets and Sets the loop state of the current track as a boolean.

currentTime

Gets the currentTime in seconds as a number.

ended

Gets the ended state of the current track as a boolean. This will be true if the track has "naturally" ended.

seeking

Gets seeking state of the current track as a boolean. Returns true while track is performing seek.

spectrumData

Gets the raw FFT spectrum data of the current track as an array. This consists of 512 elements with values ranging from 0-1. The left and right channels are represented by 256 elements each, respectively.

duration

Gets the duration in seconds of the current track as a number.

error

Gets the most recent error.

Docs Navigation