npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lightning-jukebox

v0.0.1

Published

A Lightning powered Jukebox

Downloads

7

Readme

Lightning Jukebox

A Lightning powered Jukebox :zap: Pay with Bitcoin to choose your music.

Built with Lightning Charge, plays music from YouTube.

HOWTO

  1. Setup Lightning Charge.

  2. Install Lightning Jukebox and start jukeboxd:

    $ npm install -g lightning-jukebox
    
    $ jukeboxd --charge-token mySecretToken --price '0.0001 BTC'
    Jukebox server running on http://localhost:6100

    You may pick a different theme from bootswatch by specifying --theme [name] (the default is darkly).

  3. Navigate to http://localhost:6100/ on the computer playing the music and click Spawn YouTube player. This will open a new youtube window in a new tab. Make sure keep both the page on localhost:6100 and the youtube window open. You can use the youtube window to start playing some initial music.

  4. The payment page (http://localhost:6100/pay) allows users to pay for music selection. You can make this page available over the internet, or set it up on a local device near the jukebox (like a tablet).

    Once a payment is made, a push notification will be sent to the player window (via websockets), which will open the requested song in the spawned youtube window.

    Payments can also be made directly to the API:

    # with a search string
    $ BOLT11=`curl http://localhost:6100/invoice -d video='are you shpongled full album'`
    $ lightning-cli decodepay $BOLT11
    $ lightning-cli pay $BOLT11
    
    # with a specific video id
    $ lightning-cli pay `curl http://localhost:6100/invoice \
                         -d video=https://www.youtube.com/watch?v=IDiZG-eAk30'

CLI options

$ jukeboxd --help

  A Lightning powered Jukebox

  Usage
    $ jukeboxd [options]

  Options
    -c, --charge-url <url>      lightning charge server url [default: http://localhost:9112]
    -t, --charge-token <token>  lightning charge access token [required]

    -P, --price <price>         price to play music [default: 0.0001 BTC]
    -m, --theme <name>          pick theme from bootswatch.com [default: darkly]
    -l, --title <name>          website title [default: Lightning Jukebox]

    -p, --port <port>           http server port [default: 9115]
    -i, --host <host>           http server listen address [default: 127.0.0.1]
    -h, --help                  output usage information
    -v, --version               output version number

  Example
    $ jukeboxd -t chargeSecretToken -P '0.0005 EUR'

Why a separate YouTube tab instead of embedding the video player?

So that "auto play next" works.

License

MIT