archfizz/phpairplay

v0.0.1 2014-05-02 14:59 UTC

This package is not auto-updated.

Last update: 2024-04-13 12:53:50 UTC


README

Build Status Scrutinizer Code Quality HHVM Testing

Mirror your desktop to an Apple TV device using this PHP command line utility.

This utility will repeatedly take a screenshot of your desktop and put it on your Apple TV.

Usage

Just run this command, but replace the IP address 192.168.0.69 with whatever the IP address of your Apple TV is.

$ php bin/airplay mirror 192.168.0.69

Most of the time, you can simply run.

$ php bin/airplay mirror Apple-TV.local

Features

Mirroring

Mirroring will repeatedly take a screenshot of your desktop and put it on your Apple TV. Depending on your system, a number of utilities can be used to capture the screenshot.

Syntax:

$ php bin/airplay mirror [host] --utility=[imagemagick|osx|gnome|shutter]

Video Playback

Currently work in progress, this is the next feature of PhpAirPlay.

Installation

This utility requires the following to be installed on your machine.

  • PHP 5.4
  • cURL
  • Git
  • Imagemagick

Then run these commands from the terminal to install.

$ git clone https://github.com/archfizz/phpairplay.git
$ cd phpairplay
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install

Add to existing Composer project

Add to your composer.json

{
    "require": {
        "archfizz/phpairplay": "dev-master"
    },
    "config": {
        "bin-dir": "bin"
    }
}

Then run from the root of your project

$ bin/airplay mirror Apple-TV.local

Caution

This was a quick proof-of-concept, so I haven't test-driven this project. The next update will use testing tools, so the commands may change.

Roadmap

  • Add automated tests (PhpSpec, Behat).
  • Allow any screen capture utility to be used.
  • Allow for advanced configuration.
  • Add functionality for all AirPlay features.