An open API service indexing awesome lists of open source software.

https://github.com/m1ga/ti.mediacontrol

Android Media control: notification and lock-screen audio player for Titanium SDK
https://github.com/m1ga/ti.mediacontrol

android audio lockscreen player titanium-module titanium-sdk

Last synced: 22 days ago
JSON representation

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

Awesome Lists containing this project

README

          

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

## Installation

* download the module from [dist](https://github.com/m1ga/ti.mediacontrol/tree/main/android/dist)
* put the ZIP into you project root
* add `ti.mediacontrol` to your tiapp.xml `` 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](https://github.com/m1ga/ti.mediacontrol/tree/main/example) for a full example.

## License

MIT

## Author

* Michael Gangolf