MCPcopy Index your code
hub / github.com/mafintosh/chromecasts

github.com/mafintosh/chromecasts @v1.9.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.9.1 ↗ · + Follow
6 symbols 8 edges 1 files 0 documented · 0% 2 cross-repo links updated 4y ago★ 1,45210 open issues

Browse by type

Functions 6 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

chromecasts

Query your local network for Chromecasts and have them play media

npm install chromecasts

Usage

var chromecasts = require('chromecasts')()

chromecasts.on('update', function (player) {
  console.log('all players: ', chromecasts.players)
  player.play('http://example.com/my-video.mp4', {title: 'my video', type: 'video/mp4'})
})

API

var list = chromecasts()

Creates a chromecast list. When creating a new list it will call list.update() once. It is up to you to call afterwards incase you want to update the list.

list.update()

Updates the player list by querying the local network for chromecast instances.

list.on('update', player)

Emitted when a new player is found on the local network

player.play(url, [opts], cb)

Make the player play a url. Options include:

{
  title: 'My movie',
  type: 'video/mp4',
  seek: seconds, // start by seeking to this offset
  subtitles: ['http://example.com/sub.vtt'], // subtitle track 1,
  autoSubtitles: true // enable first track if you provide subs
}

player.subtitles(track, [cb])

Enable subtitle track. Use player.subtitles(false) to disable subtitles

player.pause([cb])

Make the player pause playback

player.resume([cb])

Resume playback

player.stop([cb])

Stop the playback

player.seek(seconds, [cb])

Seek the video

player.status(cb)

Get a status object of the current played video.

player.on('status', status)

Emitted when a status object is received.

License

MIT

Core symbols most depended-on inside this repo

Shape

Function 6

Languages

TypeScript100%

Modules by API surface

index.js6 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add chromecasts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page