Code Monkey home page Code Monkey logo

mpris-service.js's Introduction

mpris-service.js Build status

JavaScript based MPRIS service

This library is still a work in progress and incomplete

// TODO: If we come back to resume this, we had started PlayerInterface (haven't touched TrackList nor Playlists yet). Methods are set up, properties are not. We need to add tests for methods. We can base everything off of work in RootInterface

// TODO: Add back array handling // TODO: Handle and document Set actions (from our API, not a client) for the interfaces (e.g. updating Fullscreen status) // mrpisService.Root.Set('Fullscreen', true); // Updates value, notifies DBus...Properties // TODO: Take care of all TODOs

Missing/broken features:

  • GetAll not supported for Root
    • TODO: Link to upstream issue
  • Using Set on properties not supported
    • As a result, changes to Fullscreen etc will not be supported
    • TODO: Link to upstream issue

Getting Started

Install the module with: npm install mpris-service.js

var mprisService = require('mpris-service.js');
mprisService(); // 'awesome'

Documentation

We export a MprisService constructor as our module.exports

new MprisService(params)

Constructor a new MprisService. It creates a DBus connection and sets up its interfaces. However, we don't request a name from DBus.

  • params Object - Container for parameters
    • Root Object - Container for methods/properties for our the root MediaPlayer2 interface
    • TODO: Document TrackList, Playlists

new RootInterface(params)

Interface implementation for MediaPlayer2

http://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html

  • params Object - Same parameters as new MprisService(params)
    • Root Object - Container for parameters specific to RootInterface
    • TrackList Object - Container for parameters specific to TrackListInterface
      • If this is provided, then we will set HasTrackList to true
      • Otherwise, HasTrackList will be false

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint via npm run lint and test via npm test.

Donating

Support this project and others by twolfson via gratipay.

Support via Gratipay

Unlicense

As of Jan 06 2016, Todd Wolfson has released this repository and its contents to the public domain.

It has been released under the UNLICENSE.

mpris-service.js's People

Contributors

twolfson avatar

Watchers

James Cloos avatar  avatar  avatar

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.