- download the module from dist
- put the ZIP into you project root
- add
<module>ti.mediacontrol</module>
to your tiapp.xml<modules>
section.
-
createPlayer(options): creates a new player + notification. Options:
-
showNext: show the next button
-
showPrevious: show the previous button
-
title: first row (title)
-
text: second row (text)
-
backgroundImage: background image of the player
-
close(): close the player/dismiss the notification.
-
updateInfo({title: "", text: ""}): change both strings at the same time
-
play(): puts the player into play mode
-
pause(): puts the player into pause mode
-
setMetadata(options): sets the track metadata Options:
-
title: Text
-
artist: Text
-
album: Text
- backgroundImage: change the background image of the player
- title: change the first row (title)
- text: change the second row (text)
- PLAY
- PAUSE
- NEXT
- PREVIOUS
- changeStatus: is fired when the status of the player changes. It will return
status
with one of the constants.
check examples/app.js for a full example.
MIT
- Michael Gangolf