Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

airplayer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airplayer

Query your local network for Apple TV's and have them play videos

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

airplayer

Query your local network for Apple TV's or other AirPlay video compatible devices and have them play videos.

Build status js-standard-style

Installation

For programmatic use, install using:

npm install airplayer --save

Or install globally to use via the command line:

npm install airplayer --global

Example Programmatic Usage

var airplayer = require('airplayer')

var list = airplayer()

list.on('update', function (player) {
  console.log('Found new AirPlay device:', player.name)
  player.play(url)
})

Example CLI Usage

If you install the module gobally, simply run the airplayer command with the file you want to play as the first argument.

The airplayer command will look for an Apple TV on your local network. When one is found, it will start playing the chosen video. Use the option -i to select the Apple TV to stream to.

$ airplayer my-video.m4v

Note that the video must be in a format supported by your Apple TV in order for airplayer to play it.

API

var list = airplayer()

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

list.players

An array of the players that have been found on the local network so far.

list.update()

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

list.destroy()

Stop browsing for players.

list.on('update', player)

Emitted when a new player is found on the local network.

The player is an instance of airplay-protocol with the following extra properties:

  • name - The human readable name of the AirPlay device

License

MIT

Keywords

FAQs

Package last updated on 30 Apr 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc