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.
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
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]
Currently work in progress, this is the next feature of PhpAirPlay.
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 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
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.
- Add automated tests (PhpSpec, Behat).
- Allow any screen capture utility to be used.
- Allow for advanced configuration.
- Add functionality for all AirPlay features.