Plays YouTube videos for the current Sonos track in Chrome.
-
Create a server API key for use with the YouTube API. For more info, see the relevant Google developer docs.
-
Make sure Chrome is completely shut down.
-
$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 -
$ npm install -
$ node index.js --key=YOUR_API_KEY -
Grab a beer.
| Option | Description | Default |
|---|---|---|
| pollInterval | How often to check the current track on Sonos, in milliseconds. | 1000 |
| fallbackVideo | YouTube ID of the video to play if no results are found. | QH2-TGUlwu4 |
This module is a lot of fun for situations where you're using Sonos as a jukebox, with lots of people adding music to the queue. Audio and video will never be perfectly synced -- that's not the goal of this module.
For best results while using this module:
- Log into YouTube with an account that can view age restricted videos.
- Block preroll ads on YouTube.
- Mute your Mac's audio.
- Be intoxicated.
MIT