Skip to content

GPMDP/gmusic-mini-player.js

Repository files navigation

gmusic-mini-player.js

Build Status GitHub release Code Climate GitHub license

Browser-side JS library for transforming Google Music into a mini player.

This was built as part of Google Play Music Desktop Player, a C# wrapper around Google Music. It was extracted to allow other to make better use of it.

gmusic-mini-player.js is not created by, affiliated with, or supported by Google Inc.

Getting Started

npm

Install the module with: npm install gmusic-mini-player.js. This module extends on the code utility library gmusic.js so you must include that first.

Once installed, add it to your HTML and access it via (new window.GMusic(window)).miniPlayer.

<script src="node_modules/gmusic-mini-player.js/dist/gmusic-mini-player.min.js"></script>
<script>
  window.GPM = new window.GMusic(window); // Our Google Music API
  window.GPM.mini // Our mini player controller
</script>

Vanilla

If you are not using a package manager, download the latest script at:

https://raw.githubusercontent.com/GPMDP/gmusic-mini-player.js/master/dist/gmusic-mini-player.min.js

Then, add it to your HTML and access it via window.GMusicTheme.

<script src="gmusic-mini-player.min.js"></script>
<script>
  window.GPM = new window.GMusic(window); // Our Google Music API
  window.GPM.mini // Our mini player controller
</script>

Documentation

gmusic-theme.js exposes a new section under GMusic.js

GMusic.mini

enable()

Enables mini player mode

disable()

Disabled mini player mode

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.

Testing

Currently there is no testing framework. How do we test a theming library????

About

Mini player JS transformer for Google Play Music

Resources

License

Stars

Watchers

Forks

Packages

No packages published