Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
AirPlay trampoline server and various tools
JavaScript
tree: f9a7a2b066

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
.npmignore
README.md
package.json

README.md

Service API:

List all devices on the network (query occasionally) GET /device/ --> { devices: [ { id: string, name: string, deviceId: string, features: number, model: string, slideshowFeatures: [], supportedContentTypes: [string, ...] }, ... ] }

Get the information of a specific device GET /device/id/ --> { id: string, name: string, deviceId: string, features: number, model: string, slideshowFeatures: [], supportedContentTypes: [string, ...] }

Get the playback status of a device GET /device/id/status --> { duration: number, position: number, rate: number, playbackBufferEmpty: boolean, playbackBufferFull: boolean, playbackLikelyToKeepUp: boolean, readyToPlay: boolean, loadedTimeRanges: [ { start: number, duration: number }, ... ], seekableTimeRanges: [ { start: number, duration: number }, ... ] }

TODO: Authorize a device POST /device/id/authorize {} --> {}

Begin playback of the given content POST /device/id/play { content: string, start: number } --> {}

Stop playback of the current content POST /device/id/stop {} --> {}

Seek to the given position in the current content POST /device/id/scrub { position: number } --> {}

Reverse playback of the current content POST /device/id/reverse {} --> {}

Change the playback rate of the current content (0 = pause, 1 = resume) POST /device/id/rate { value: number } --> {}

Adjust the playback volume POST /device/id/volume { value: number } --> {}

TODO: Post a photo for slideshow mode POST /device/id/photo { content: string, transition: string } --> {}

HTTP/1.1 200 OK Date: Sat, 05 Nov 2011 23:20:41 GMT Content-Type: text/x-apple-plist+xml Content-Length: 820 X-Transmit-Date: 2011-11-05T23:20:41.911377Z

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> duration 5555.0495000000001 loadedTimeRanges duration 5555.0495000000001 start 0.0 playbackBufferEmpty playbackBufferFull playbackLikelyToKeepUp position 4.6269989039999997 rate 1 readyToPlay seekableTimeRanges duration 5555.0495000000001 start 0.0

HTTP/1.1 200 OK Date: Sat, 05 Nov 2011 23:34:13 GMT Content-Type: text/x-apple-plist+xml Content-Length: 427

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> deviceid xx:xx:xx:xx:xx:xx features 14839 model AppleTV2,1 protovers 1.0 srcvers 120.2

Something went wrong with that request. Please try again.