Skip to content

Android Media control: notification and lock-screen audio player for Titanium SDK

License

Notifications You must be signed in to change notification settings

m1ga/ti.mediacontrol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Media control: notification and lock-screen audio player for Titanium SDK

Installation

  • download the module from dist
  • put the ZIP into you project root
  • add <module>ti.mediacontrol</module> to your tiapp.xml <modules> section.

Methods

  • 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

Properties

  • backgroundImage: change the background image of the player
  • title: change the first row (title)
  • text: change the second row (text)

Constants

  • PLAY
  • PAUSE
  • NEXT
  • PREVIOUS

Events

  • changeStatus: is fired when the status of the player changes. It will return status with one of the constants.

Example

check examples/app.js for a full example.

License

MIT

Author

  • Michael Gangolf

About

Android Media control: notification and lock-screen audio player for Titanium SDK

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published