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.
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>
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>
gmusic-theme.js
exposes a new section under GMusic.js
Enables mini player mode
Disabled mini player mode
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
.
Currently there is no testing framework. How do we test a theming library????