Class: Player

Mobizen.Tools.Player

new Mobizen.Tools.Player(tools)

Name Type Description
tools Mobizen.Tools

parent object

Requires

Classes

Context
Controller

Members

history array

list array

played number

song object

status object

Properties:
Name Type Description
mute boolean
random boolean
repeat boolean

Type Definitions

Methods

append(item)

Name Type Description
item object

currentAlbum(){function}

Returns:
Type Description
function trigger

next(){object|null}

Returns:
Type Description
object | null next song or null

nextAlbum(){function}

Returns:
Type Description
function trigger or null

nextSong(songs){object}

Name Type Description
songs array
Returns:
Type Description
object next song
Listens to Events:

onplaying()

Listens to Events:

play(song, album, clear)

Name Type Description
song object
album array
clear boolean optional

prepend(item)

Name Type Description
item object

prev(){object|null}

Returns:
Type Description
object | null prev song or null

prevAlbum(song){function}

Name Type Description
song object
Returns:
Type Description
function trigger

preview(song)

Name Type Description
song object
Fires:

remove(items, channel)

Name Type Description
items array
channel string

The name of channel of socket.

set(customPlayList)

Name Type Description
customPlayList boolean optional

stop(noupdate)

Name Type Description
noupdate boolean optional

storage(key, val)

Name Type Description
key string
val * optional

toggle(event)

Name Type Description
event DOMEvent

inner pop(arr, i){array}

Name Type Description
arr array

array

i number

number of index

Returns:
Type Description
array poped array

inner random(length){number}

Name Type Description
length number

max number

Returns:
Type Description
number rendom picked number

inner sorting(array){array}

Name Type Description
array array
Returns:
Type Description
array sorted
comments powered by Disqus