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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pychromecast-wrapper

v0.0.8

Published

Node.js wrapper for pychromecast python library

Readme

JavaScript Style Guide

pychromecast-node-wrapper

You're probably asking yourself "why not rewrite pychromecast in node ?". Heh well..., the interface protocol for Google Chromecast devices isn't that well documented and the folks behind pychromecast made a great work at reverse engineering the Chromecast protocol. Pychromecast is popular and well maintained, so my library's purpose is only to expose some actions from pychromecast to the js world.

Install

npm i pychromecast-wrapper
pip install -r node_modules/pychromecast-wrapper/requirement.txt

If something goes wrong during installation, something around mdns and node-gyp, take a look at mdns#installation and install missing system package.

Usage and Exemple

const { Chromecast } = require('pychromecast-wrapper')

(async () => {

  // Wait for discovery to do its work
  await new Promise(resolve => setTimeout(resolve, 1000))

  // Set all dsicovered chromecast volume
  await Chromecast.setVolume({ volume: 0.5 })

  // Find chromecast with a given name and toggle mute status
  const chromecast = Chromecast.findOne({ name: 'My Chromecast' })
  await chromecast.toggleMute()

})()

API Reference

| Method | Arguments | Default | Returns | Description | | :--- | :---: | :---: | :---: | :--- | | Chromecast.findAll() | { [key: string]: any } | - | [Chromecast] | Get all devices where predicate return true | | Chromecast.findOne() | { [key: string]: any } | - | [Chromecast] | Get first device where predicate return true | | async Chromecast.refreshStatus() | - | - | [Chromecast] | Refresh all devices status (isPlaying, isMuted, isActive, volume) | | async Chromecast.setVolume() | { volume: float } | { volume = 1 } | [Chromecast] | Set volume for all devices (between 0 and 1) | | async Chromecast.toggleMute() | - | - | [Chromecast] | Toggle mute for all devices. Refresh all devices status | | async Chromecast.playPause() | - | - | [Chromecast] | Toggle play or pause for all devices. Refresh all devices status | | async Chromecast.rewind() | { time: number } | { time = 30 } | [Chromecast] | Rewind played media fo a given time in second for all active devices. Refresh all devices status |

| Method | Arguments | Default | Returns | Description | | :--- | :---: | :---: | :---: | :--- | | chromecast#setVolume() | { volume: float } | { volume = 1 } | [Chromecast] | Set volume for current instance (between 0 and 1) | | chromecast#toggleMute() | - | - | [Chromecast] | Toggle mute for current instance. Refresh current instance status | | chromecast#playPause() | - | - | [Chromecast] | Toggle play or pause for current instance. Refresh current instance status | | chromecast#rewind() | { time: number } | { time = 30 } | [Chromecast] | Rewind played media fo a given time in second for current instance. Refresh current instance status |

| Attribute | Type | Description | | :--- | :---: | :--- | | chromecast#isPlaying | boolean | true if a media is playing on chromecast | | chromecast#isMuted | boolean | true if volume is muted on chromecast | | chromecast#isActive | boolean | true if an app is active on chromecast (ex: true if Netflix running) | | chromecast#volume | float | Return a float between 0 and 1 | | chromecast#refreshedAt | timestamp | Date of last status refresh | | chromecast#name | string | Chromecast friendly name | | chromecast#uuid | string | Chromecast uuid | | chromecast#modelName | string | Chromecast model name | | chromecast#castType | cast | audio | group | Chromecast type | | chromecast#port | number | Chromecast port | | chromecast#ip | string | Chromecast ip address |