Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
chromecasts
Advanced tools
Query your local network for Chromecasts and have them play media
npm install chromecasts --save
const chromecasts = require('chromecasts')()
chromecasts.on('update', players => {
console.log('all players: ', players)
player.play('http://example.com/my-video.mp4', {title: 'my video', type: 'video/mp4'})
})
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.
MIT
FAQs
Query your local network for Chromecasts and have them play media
The npm package chromecasts receives a total of 277 weekly downloads. As such, chromecasts popularity was classified as not popular.
We found that chromecasts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.