Code Monkey home page Code Monkey logo

ti.mediacontrol's Introduction

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

ti.mediacontrol's People

Contributors

m1ga avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

gaodbk

ti.mediacontrol's Issues

Toggle Play/Pause from app

Less an issue than a feature request. It would be good to be able to toggle the ti.mediacontrol Play/Pause from within the controlling app to be able to keep it in sync with its own Play/Pause. That would be needed if ti.mediacontrol is left on the lockscreen rather than opened and closed with each 'Play' and 'Pause/Stop' from the controlling app.

I hope that makes sense!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.