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

youtube-jukebox

v1.1.2

Published

A YouTube Jukebox built using Gatsby

Downloads

23

Readme

A Gatsby YouTube Jukebox

I love YouTube, but it doesn't allow you to queue videos and even when searching for something it stops the current video. I had a look around GitHub, but couldn't quite find what I was looking for, so I built my own using Gatsby. If I'm honest, I wanted a small project to try Gatsby. I've been using React for a few projects at work, but hadn't had the opportunity to try Gatsby.

What I wanted to be able to do is to search and queue videos without stopping the currently playing video. I also wanted to be able to manipulate the order of videos in the queue. For example, move items up and and down, remove or 'play now'.

Installation

This README assumes you have your environment set-up with Node, Gatsby etc. and won't be covered any further here.

Simply clone the repo and run

gatsby develop

or

gatsby build

followed by

gatsby serve

API Key

To be able to use the YouTube Search API, you need a Google/YouTube API key. As with Node setup, I'm not going into how to obtain the keys. There's plenty of help on the Internet and Google's own site is helpful enough.

When you have the key, update the apiKey.js file in the config folder.

Using the Jukebox

The UI is broken into three main components...

  • Video Player This is largest panel and is where the current video will play. When the app starts, it displays a message to search fpr videos.
  • Search Panel This is the horizontal panel across the bottom of the screen. This panel allows the user to search (once logged in) and the results are displayed under the search field.
  • Queue Panel This is the panel on the right-hand side. This panel houses the functionalilty to login in to your Google account as well as the videos you have queued.

Once the app starts, you can search, queue and play videos. I've also used Chrome and ChromeCast to cast the application onto a TV.

  • Searching Just type in the search box and click the button. Click any of the results to play the first video. Subsequent videos you click will be queued up. When a video finishes playing, the next video starts and so on until the queue is empty.

  • Queue You can manipulate the queue by using up and down icons. You can remove items by clicking the 'x' icon. Lastly, if you want to play something from the queue immediately, just click the image of the item in the link.

Theme Change Button The Theme Change button toggles the UI between a light and dark theme.

Other Points Once you have queued a few videos, you can click the full-screen icon in the video play. The app will then just keep playing your queued videos til they run out.

Browsers I have tried this app using both Safari and Chrome for Mac OSX.

Tests

I've added some snapshot and component tests. The tests are written with Jest and Enzyme.

To run,

npm run-script test

If you make any changes to the components, you'll need to update test snapshots.

npm run-script test-update