Coder Social home page Coder Social logo

airplay's Introduction

Airplay

Code Climate Build Status

Airplay

Airplay attempts to be compatible with the latest AppleTV firmware but I'd like to add compatibility to other servers.

Contribute

You can contribute with code, bugs or feature requests.

The development of the gem takes time and there's a lot of research and hardware tests to make all of this. If you want to contribute please consider donating as much as you want in: Paypal or Gumroad

Table of Contents

Installation

Library

gem install airplay

CLI

gem install airplay-cli

Usage

CLI

View devices

air list

air list

* Apple TV (AppleTV2,1 running 11A502)
  ip: 192.168.1.12
  resolution: 1280x720

Play a video

air play [url to video or local file]

air play

Playing http://movietrailers.apple.com/movies/universal/rush/rush-tlr3_480p.mov?width=848&height=352
Time: 00:00:13 [=====                                              ] 7% Apple TV

Show images

air view [url to image or image folder]

Library

Configuration

Airplay.configure do |config|
  config.log_level      # Log4r levels (Default: Log4r::ERROR)
  config.autodiscover   # Allows to search for nodes (Default: true)
  config.host           # In which host to bind the server (Default: 0.0.0.0)
  config.port           # In which port to bind the server (Default: will find one)
  config.output         # Where to log (Default: Log4r::Outputter.stdout)
end

Devices

require "airplay"

Airplay.devices.each do |device|
  puts device.name
end

Accessing and Grouping

# You can access a known device easily
device = Airplay["Apple TV"]

# And add the password of the device if needed
device.password = "my super secret password"

# Or you can group known devices to have them do a given action together
Airplay.group["Backyard"] << Airplay["Apple TV"]
Airplay.group["Backyard"] << Airplay["Room TV"]

# The groups can later do some actions like:
Airplay.group["Backyard"].play("video")

Images

require "airplay"

apple_tv = Airplay["Apple TV"]

# You can send local files
apple_tv.view("my_image.png")

# Or use remote files
apple_tv.view("https://github.com/elcuervo/airplay/raw/master/doc/img/logo.png")

# And define a transition
apple_tv.view("url_to_the_image", transition: "Dissolve")

# View all transitions
apple_tv.transitions

Video

require "airplay"

apple_tv = Airplay["Apple TV"]
trailer = "http://movietrailers.apple.com/movies/dreamworks/needforspeed/needforspeed-tlr1xxzzs2_480p.mov"

player = apple_tv.play(trailer)
Playlist
# You can also add videos to a playlist and let the library handle them
player.playlist << "video_url"
player.playlist << "video_path"
player.play

# Or control it yourself
player.next
player.previous

# Or if you prefer you can have several playlists
player = apple_tv.player
player.playlists["Star Wars Classic"] << "Star Wars Episode IV: A New Hope"
player.playlists["Star Wars Classic"] << "Star Wars Episode V: The Empire Strikes Back"
player.playlists["Star Wars Classic"] << "Star Wars Episode VI: Return of the Jedi"

player.playlists["Star Wars"] << "Star Wars Episode I: The Phantom Menace"
player.playlists["Star Wars"] << "Star Wars Episode II: Attack of the Clones"
player.playlists["Star Wars"] << "Star Wars Episode III: Revenge of the Sith"

player.use("Star Wars Classic")
player.play
player.wait
Player
# Wait until the video is finished
player.wait

# Actions
player.pause
player.resume
player.stop
player.scrub
player.info
player.seek

# Access the playback time per second
player.progress -> progress {
  puts "I'm viewing #{progress.position} of #{progress.duration}"
}

Testing

Now there are two types of tests: Regular unit tests and integration tests. Thanks to the magic of the internet and a raspberry pi there are integration tests with a real Apple TV that is currently accessible.

Block TV

The Apple TV is password protected to avoid issues with the tests but is configured in Travis CI. For that reason you won't be able to run those tests if you don't have an Apple TV.

Run unit tests with: rake test:unit and integration ones with: rake test:integration You can run all of them together with: rake test:all

Documentation

All the documentation of the README can be found in the doc folder. To generate an updated README based on the contents of doc please use rake doc:generate

Contributors

Last but not least a special thanks to all the contributors

airplay's People

Contributors

aaronlasseigne avatar aesthetikx avatar andrewgarner avatar elcuervo avatar jonahoffline avatar michaelbernstein avatar picandocodigo avatar pote avatar ronald avatar sebastiansier avatar sodabrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airplay's Issues

Airplay::Connection crashed!, ThreadError: can't create Thread (35)

Turned up while testing today.

Airplay::Connection crashed!
ThreadError: can't create Thread (35)
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in create' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:69:inblock in get'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:in synchronize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:inget'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:10:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection/persistent.rb:16:ininitialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:inpersistent'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:32:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:inpublic_send'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
Airplay::Protocol::Player crashed!
ThreadError: can't create Thread (35)
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in create' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:69:inblock in get'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:in synchronize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:inget'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:10:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection/persistent.rb:16:ininitialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:inpersistent'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:32:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:inpublic_send'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
(celluloid):0:in remote procedure call' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:invalue'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in method_missing' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/protocol/player.rb:123:incleanup'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/protocol/player.rb:139:in block in check_for_playback_status' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'

HowTo documentation feature request

Feature request.

A simple HowTo for two or three popular operating systems on how to get this implementation going. Something to ease in semi-skilled users without knowledge of Ruby into being able to run the examples.

Perhaps MacOS + Macports, Debian/Ubuntu + apt, RedHat/Centos + yum.

Theoretical example for Ubuntu:

  1. Install ruby:
    sudo apt-get install ruby rake rubygems

  2. Install required gems:
    gem install cutest dnssd

  3. Unpack the downloaded tarball:
    tar xzvf elcuervo-airplay-xxxxxx.tar.gz
    cd elcuervo-airplay-xxxxxx

  4. Build and install:
    rake
    sudo rake install

At this point it will be possible to run attached examples by executing: 'ruby example1.rb'.

Alternatively, perhaps just a pointer a resource in the README file could resolve this issue. I don't believe it should be a crash-course in operating system administration but perhaps a simple, customary 'install these dependencies on the OS, install the following gems and run these commands to build' could be really helpful.

I'm happy to test and help with editing such documentation for the following operating systems:

Ubuntu 11.04
CentOS 6
SUSE Linux Enterprise 11
OpenSUSE 12.1
MacOS X 10.7 (with MacPorts)

Unfortunately I don't have any experience with Ruby and can't just write such documentation myself.

Best regards,

grok

CLI: call back after video has finished playing

Playing public/Videos/output.mp4
Time: 00:03:20 [===================================================== ] 99% cubo

After the video finished, it should be possible to reach 100% (currently it stops at 99%). Additionally, I feel like there should be some sort of call back for when a video has finished playing in its entirety.

Error persistent: Net::PTTH crashed!

ERROR persistent: Net::PTTH crashed!
NoMethodError: undefined method -' for nil:NilClass /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.13/lib/net/ptth/socket.rb:18:inrescue in write'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.13/lib/net/ptth/socket.rb:15:in write' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.13/lib/net/ptth.rb:156:inblock in keep_connection_active'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in block in create' ERROR persistent: Net::PTTH crashed! NoMethodError: undefined method-' for nil:NilClass
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.13/lib/net/ptth/socket.rb:18:in rescue in write' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.13/lib/net/ptth/socket.rb:15:inwrite'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.13/lib/net/ptth.rb:156:in block in keep_connection_active' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'

Happened after playing several videos in sequence. I interrupted playback several times to send a new video and then on completing the last video in full, it threw this error message. After this error, I was required to restart the server before I could send more videos to the apple tv.

Thanks for your continued work on this, Bruno! Many hugs from Ohio :)

"An error occurred loading this content"

I am trying to play a simple AVI file using the CLI via air play ~/path/to/video.avi.

The AppleTV shows a spinner for a moment then shows the error: "An error occurred loading this content".

AppleTV Info
Model: MD199LL/A
Software: 5.3 (6105)

Cleanup at_exit

Cleanup nicely after Ctrl+C is pressed to avoid crazy warnings.

Apple TV returns to home screen between images when device has password

My ATV 2, with latest iOS 5, returns to the home screen in between updates. I haven't started diagnosing what's up -- maybe I'm losing my connection between send_image / send_video calls? Opening this issue in case you've debugged this before.

Steps:

  airplay = Airplay::Client.new
  airplay.use apple_tv_name
  airplay.password apple_tv_password
  airplay.send_image(url1)
  airplay.send_image(url2)

Expected:
Apple TV displays url1, then displays url2 without interruption.

Actual:
Apple TV displays url2, then home screen, then url2.

Net::PTTH crashed!, Errno::EPIPE: Broken Pipe

Context: I was using FFMPEG to transcode a video file with more than one audio channel. After completing the process, I fed the new video file into airplay. After airplay resumed playing the file, it held on a black screen then crashed.

Net::PTTH crashed!
Errno::EPIPE: Broken pipe
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.9/lib/net/ptth/socket.rb:12:in write' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.9/lib/net/ptth/socket.rb:12:inwrite'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.9/lib/net/ptth.rb:149:in block in keep_connection_active' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Airplay::Connection crashed!
Celluloid::DeadActorError: attempted to call a dead actor
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:23:in method_missing' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/connection/persistent.rb:31:insocket'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/connection/persistent.rb:27:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/connection.rb:32:inclose'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in public_send' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:inblock in handle_message'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in block in create' Airplay::Protocol::Player crashed! Celluloid::DeadActorError: attempted to call a dead actor /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:23:inmethod_missing'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/connection/persistent.rb:31:in socket' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/connection/persistent.rb:27:inclose'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/connection.rb:32:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:inpublic_send'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
(celluloid):0:in remote procedure call' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:invalue'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in method_missing' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/protocol/player.rb:123:incleanup'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-805b6ee203f2/lib/airplay/protocol/player.rb:139:in block in check_for_playback_status' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait

Need example of playing beyond 30sec clip....

What is the right way to play videos that are longer than the 30 seconds timeout between the airplay script and apple tv?

I'm doing this to play the video until the end before transitioning over to an image...

require 'airplay'

client = Airplay::Client.new                                                                          
player = client.send_video("http://192.168.0.242/~wing/IMG_0301.MOV")

begin
  sleep 1
  scrub = player.scrub
  pos = scrub["position"].to_i
  duration =  scrub["duration"].to_i
end until (pos >= duration)

client.send_image("http://192.168.0.242/~wing/p.jpg", :dissolve)

sleep(10)

If it's right, it might be good to add it to the examples. It was driving me nuts trying to figure out a way to play the entire video.

Also, after the video is played, there is a blip between the end of the video and the start of the image dissolve, any way to avoid that?

Thanks for the gem!

wing

Airplay::Connection Crashed! IOError: closed stream

This error required me to restart the server.

Airplay::Connection crashed!
IOError: closed stream
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.8/lib/net/ptth/socket.rb:16:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.8/lib/net/ptth/socket.rb:16:inclose'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-bd0b719b3a0c/lib/airplay/connection/persistent.rb:27:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-bd0b719b3a0c/lib/airplay/connection.rb:31:inclose'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:25:in public_send' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:25:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:67:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:322:inblock in handle_message'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks/task_fiber.rb:13:in block in create' Airplay::Protocol::Player crashed! IOError: closed stream /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.8/lib/net/ptth/socket.rb:16:inclose'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.8/lib/net/ptth/socket.rb:16:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-bd0b719b3a0c/lib/airplay/connection/persistent.rb:27:inclose'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-bd0b719b3a0c/lib/airplay/connection.rb:31:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:25:inpublic_send'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:67:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
(celluloid):0:in remote procedure call' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/calls.rb:92:invalue'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/proxies/sync_proxy.rb:33:in method_missing' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-bd0b719b3a0c/lib/airplay/protocol/player.rb:138:inblock in check_for_playback_status'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait

Apple TV 5.2 advertises differently than 6.0

Apple TV v3 running OS 5.2:

{"deviceid"=>"B8:78:2E:41:92:A1", "features"=>1518338039, "model"=>"AppleTV3,2", "protovers"=>"1.0", "srcvers"=>"160.10"}

Apple TV v3 running OS 6.0:

{"deviceid"=>"00:00:00:00:00:00", "features"=>61647880183, "model"=>"AppleTV3,2", "osBuildVersion"=>"11B554a", "protovers"=>"1.0", "srcvers"=>"190.9", "vv"=>2}

(This is the output of device.basic_info -- I made it non-private to dump the output)

Problems building Gem in 10.8

I'm trying to build the gem in 10.8 and I am getting this message:

Building native extensions. This could take a while...
ERROR: Error installing airplay:
ERROR: Failed to build gem native extension.

    /Users/User/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for dns_sd.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/User/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-warnings
--without-warnings
--with-dnssd-dir
--without-dnssd-dir
--with-dnssd-include
--without-dnssd-include=${dnssd-dir}/include
--with-dnssd-lib
--without-dnssd-lib=${dnssd-dir}/lib
/Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:intry_cpp'
from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in block in have_header' from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:inblock in checking_for'
from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:inopen'
from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:inopen'
from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:inchecking_for'
from /Users/User/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in have_header' from extconf.rb:7:in

'

Gem files will remain installed in /Users/User/.rvm/gems/ruby-1.9.3-p194/gems/dnssd-2.0 for inspection.
Results logged to /Users/User/.rvm/gems/ruby-1.9.3-p194/gems/dnssd-2.0/ext/dnssd/gem_make.out

Any suggestions? Has anyone built on 10.8?

Default back to Apple TV menu

When the airplay player finishes a video, it should close the connection (stop using resources) and default back to the Apple TV menu. Currently, when a video has finished playing, it goes to a black screen. Using Airplay.player.wait leaves the connection open indefinitely causing the action that calls Airplay.play to stall and never complete.

I will mess around with using threads to see if it's possible to interrupt the connection that way. Currently, if you use the wait function you cannot interrupt the stream using Airplay.play(uri)

Support subtitles!

It'd be so sweet to have subtitles supported! I imagine something like

$ air play [url to video] -s path/to/subs.es.srt

Or

require "airplay"

apple_tv = Airplay["Apple TV"]
player = apple_tv.play('path/to/video', subtitles: 'path/to/subs.es.srt')

Loading the subs automatically if they're located under the same directory, with the same name would be a plus.

Net::PTTH Crashed!

I received this error earlier while stress testing the gem. I was attempting to play continuos video without interruption.

Net::PTTH crashed!
IOError: closed stream
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.7/lib/net/ptth/socket.rb:12:in write' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.7/lib/net/ptth/socket.rb:12:inwrite'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/net-ptth-0.0.7/lib/net/ptth.rb:149:in block in keep_connection_active' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:sleeping

ERROR celluloid: Reel::Rack::Server crashed!

Context:

I was using the CLI with my rails app calling commands using system(). As it stands, the CLI cannot be interrupted while sending a video. Here are the exact steps that happened to produce the following error:

1.)

system('air play "public/Videos/output.mp4"')

2.) Video began to play but I attempted to interrupt playback and send another video using fetch_video from the other thread, calling the above system(cmd) again and over-writing the output.mp4 with the new video.

3.) Nothing happened, the video continued to play. I hit ctrl+c and the CLI quit the current video and began playing the video I had requested earlier. A few more ctrl+c's and the server became unresponsive and repeatedly wanted to play output.mp4.

4.) I quit Terminal, the video remained playing despite Terminal being closed. I opened terminal, started the rails server, and then attempted to play another video generating the following errors:

ERROR celluloid: Reel::Rack::Server crashed! ] 0% cubo
Errno::EADDRINUSE: Address already in use - bind(2)
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_server.rb:11:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_server.rb:11:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_server.rb:11:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/reel-0.4.0/lib/reel/server.rb:13:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/reel-0.4.0/lib/reel/server.rb:13:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/reel-rack-0.1.0/lib/reel/rack/server.rb:20:ininitialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in public_send' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:inblock in handle_message'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'

ERROR celluloid: Celluloid::SupervisionGroup crashed!
Errno::EADDRINUSE: Address already in use - bind(2)
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_server.rb:11:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_server.rb:11:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_server.rb:11:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/reel-0.4.0/lib/reel/server.rb:13:innew'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/reel-0.4.0/lib/reel/server.rb:13:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/reel-rack-0.1.0/lib/reel/rack/server.rb:20:ininitialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in public_send' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:inblock in handle_message'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in block in create' (celluloid):0:inremote procedure call'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in value' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:inmethod_missing'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in _send_' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid.rb:200:innew_link'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/supervision_group.rb:136:in start' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/supervision_group.rb:124:ininitialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/supervision_group.rb:82:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/supervision_group.rb:82:inadd'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/supervision_group.rb:73:in supervise_as' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:inpublic_send'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:indispatch'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'

invalid XML: Start tag expected, '<' not found (CFFormatError)

System: OSX 10.9
rubies: 2.0.0-p247, 1.9.3-p448

  % air list                                                                                                                                                                                                                                                                            !5646
/Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/systemu-2.2.0/lib/systemu.rb:29:in `<class:SystemUniversal>': Use RbConfig instead of obsolete and deprecated Config.
/Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/systemu-2.2.0/lib/systemu.rb:29:in `<class:SystemUniversal>': Use RbConfig instead of obsolete and deprecated Config.
/Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/CFPropertyList-2.2.4/lib/rbNokogiriParser.rb:25:in `rescue in load': invalid XML: Start tag expected, '<' not found (CFFormatError)
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/CFPropertyList-2.2.4/lib/rbNokogiriParser.rb:13:in `load'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/CFPropertyList-2.2.4/lib/rbCFPropertyList.rb:315:in `load_str'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/CFPropertyList-2.2.4/lib/rbCFPropertyList.rb:251:in `initialize'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/device.rb:124:in `new'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/device.rb:124:in `extra_info'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/device.rb:80:in `server_info'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/device/info.rb:12:in `initialize'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/device.rb:72:in `new'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/device.rb:72:in `info'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/cli.rb:19:in `block in list'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0/lib/airplay/cli.rb:17:in `list'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/clap-1.0.0/lib/clap.rb:35:in `call'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/clap-1.0.0/lib/clap.rb:35:in `run'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/clap-1.0.0/lib/clap.rb:6:in `run'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/gems/airplay-cli-0.1.0/bin/air:8:in `<top (required)>'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/bin/air:23:in `load'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/bin/air:23:in `<main>'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
    from /Users/stefan/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'

Not showing multiple airplay recievers

I am trying to use airplay ruby from an ubuntu server machine to play images on devices around my house.

air list does not show more than 1 receiver at a time. For some reason I have to turn off the one in my office to show the one in the living room.

Am I missing something? I am trying to use air view --device LIVINGROOM

SocketError

I am super excited about this! But I can't figure out how to make it work. :'(

Kumotoshi:~ andre$ air list
/Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:52:in `getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError)
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:52:in `node_resolver'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:74:in `block in resolve'
    from /Library/Ruby/Gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:164:in `process'
    from /Library/Ruby/Gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:257:in `resolve'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:73:in `resolve'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:26:in `block (2 levels) in browse'
    from /Library/Ruby/Gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:164:in `process'
    from /Library/Ruby/Gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:66:in `browse'
    from /Library/Ruby/Gems/2.0.0/gems/dnssd-2.0/lib/dnssd.rb:178:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/dnssd-2.0/lib/dnssd.rb:86:in `browse!'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:25:in `block in browse'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:97:in `timeout'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/browser.rb:24:in `browse'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay.rb:34:in `browse'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay.rb:62:in `devices'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-1.0.0/lib/airplay/cli.rb:17:in `list'
    from /Library/Ruby/Gems/2.0.0/gems/clap-1.0.0/lib/clap.rb:35:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/clap-1.0.0/lib/clap.rb:35:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/clap-1.0.0/lib/clap.rb:6:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/airplay-cli-0.1.0/bin/air:8:in `<top (required)>'
    from /usr/bin/air:23:in `load'
    from /usr/bin/air:23:in `<main>'

Airplay::Protocol::Player Crashed!

I received this error while stress testing the gem:

Airplay::Protocol::Player crashed!
NoMethodError: undefined method zero?' for nil:NilClass /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-0f5fc83b90c2/lib/airplay/protocol/player.rb:137:inblock in check_for_playback_status'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/actor.rb:416:in block in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks.rb:55:inblock in initialize'
/Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.1/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'

Broken?

My apple TV updated to the new version of iOS and sending images doesn't seem to work anymore. Don't know what could be the cause, I haven't looked into it.

ERROR Errno::ECONNRESET: Connection Reset by peer

This might be something on my end but I figured I'd share it here. Occasionally when loading a video it will attempt to receive the media, then stop, and go back to the Apple TV main screen. This happens over the course of about 1 second or so, so it happens pretty quickly. I can resume playing media, however it spits out the following:

[2013-11-04 11:38:21] ERROR Errno::ECONNRESET: Connection reset by peer
/Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:80:in eof?' /Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:80:inrun'
/Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

Group handling

The point of moving all the logic to the Node is to being able to group them and send common commands to all of them.
It should behave the same way as a node.

Proposed API:

Airplay.group["Backyad"] << Airplay["Pool TV"]
player = Airplay.group["Backyard"].play("cool_video")
player.wait

Improve code quality & documentation

CodeClimate is not complaining too much but I'd like to improve the overall quality and the method documentation.

  • A better README.
  • Documented code.
  • Samples

CLI not working with Apple TV 6.0, 6.0.1

Michaels-MacBook-Pro-2:cube_karaoke Mike$ air list

  • Apple TV (AppleTV3,2 running 11A502)
    ip: 192.168.0.9
    resolution: 1280x720

Then I do the following:

air play "public/Videos/output.mp4"
Playing public/Videos/output.mp4

"An error occurred loading this content." -- Apple TV

CLI continues attempting to play the video meanwhile nothing happens for some amount of time until I press ctrl+c and get:

^C WARN persistent: Terminating task: type=:call, meta={:method_name=>:wait}, status=:sleeping
WARN persistent: Terminating task: type=:call, meta={:method_name=>:wait}, status=:sleeping
WARN persistent: Terminating task: type=:timer, meta=nil, status=:sleeping
WARN persistent: Terminating task: type=:timer, meta=nil, status=:sleeping
/Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/thread.rb:76:in delete': Interrupt from /Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/thread.rb:76:inblock (2 levels) in wait'
from /Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/thread.rb:75:in synchronize' from /Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/thread.rb:75:inblock in wait'
from /Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/thread.rb:66:in handle_interrupt' from /Users/Mike/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/thread.rb:66:inwait'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/mailbox.rb:69:in receive' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:97:inblock in wait'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:96:in loop' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:96:inwait'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid.rb:99:in suspend' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:invalue'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in method_missing' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0.beta1/lib/airplay/cli.rb:31:inplay'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0.beta1/bin/air:15:in block in <top (required)>' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/clap-1.0.0/lib/clap.rb:35:incall'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/clap-1.0.0/lib/clap.rb:35:in run' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/clap-1.0.0/lib/clap.rb:6:inrun'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/airplay-1.0.0.beta1/bin/air:6:in <top (required)>' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/bin/air:23:inload'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/bin/air:23:in <main>' from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:ineval'
from /Users/Mike/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `

'

I will fiddle around with this more but I haven't been able to send a video with iOS >=6.0

Airtunes compatibility

Along with Airplay there's Airtunes which is the protocol that apple devices use to send audio. This will add compatibility with Airport Express and Shairport devices.
It's build on top of rtsp and it will allow sending two actions like view and play a mp3 file.
Some commands like volume control are sent this way as well.

Could not find gem airplay-cli

Here's what the terminal spit out, Bruno:

Michaels-MacBook-Pro:cube_karaoke Mike$ gem install airplay-cli --source http://rubygems.org --pre
ERROR: Could not find a valid gem 'airplay-cli' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
ERROR: Possible alternatives: airplay, airplayer, gitlab_cli, ripple-cli, gitlab-cli

Ignore the Openssl error, I was able to use the same method to install the pre release of airplay, however it threw an error when looking for airplay-cli

MacOS X getaddrinfo

When I try to run the examples on a Mac OS X 10.7.3, I get a getaddrinfo error:

$ ruby examples/send_image.rb
/opt/local/lib/ruby/gems/1.8/gems/net-http-persistent-2.6/lib/net/http/persistent/ssl_reuse.rb:90:in initialize': getaddrinfo: nodename nor servname provided, or not known (SocketError) from /opt/local/lib/ruby/gems/1.8/gems/net-http-persistent-2.6/lib/net/http/persistent/ssl_reuse.rb:90:inopen'
from /opt/local/lib/ruby/gems/1.8/gems/net-http-persistent-2.6/lib/net/http/persistent/ssl_reuse.rb:90:in connect' from /opt/local/lib/ruby/1.8/timeout.rb:53:intimeout'
from /opt/local/lib/ruby/1.8/timeout.rb:101:in timeout' from /opt/local/lib/ruby/gems/1.8/gems/net-http-persistent-2.6/lib/net/http/persistent/ssl_reuse.rb:90:inconnect'
from /opt/local/lib/ruby/1.8/net/http.rb:553:in do_start' from /opt/local/lib/ruby/1.8/net/http.rb:548:instart'
from /opt/local/lib/ruby/gems/1.8/gems/net-http-persistent-2.6/lib/net/http/persistent.rb:511:in connection_for' from /opt/local/lib/ruby/gems/1.8/gems/net-http-persistent-2.6/lib/net/http/persistent.rb:806:inrequest'
from /opt/local/lib/ruby/gems/1.8/gems/airplay-0.2.9/lib/airplay/protocol.rb:47:in make_request' from /opt/local/lib/ruby/gems/1.8/gems/airplay-0.2.9/lib/airplay/protocol.rb:21:input'
from /opt/local/lib/ruby/gems/1.8/gems/airplay-0.2.9/lib/airplay/protocol/image.rb:38:in send' from /opt/local/lib/ruby/gems/1.8/gems/airplay-0.2.9/lib/airplay/client.rb:36:insend_image'
from examples/send_image.rb:4

Other than the above, the system can resolve DNS. When installing, following gems were automatically installed:

gem install airplay

Successfully installed net-http-persistent-2.6
Successfully installed net-http-digest_auth-1.2
Successfully installed airplay-0.2.9
3 gems installed

Googling for 'ruby getaddrinfo: nodename nor servname provided, or not known (SocketError)' yields results concerning nohup but it may be a red herring:

$ nohup ruby examples/send_image.rb

returns the same output in nohup.out.

When running the examples on other platforms (CentOS6 and Ubuntu 11.04), no errors are displayed.

Running tests/discovery.rb returns no errors (just 4 dots). This is consistent across all platforms. Installation was carried out as per #11 (comment)

Airserver compatibility?

So currently I'm testing all the compatibility against some AppleTVs but theres also http://airserver.com that works pretty well but it's not exactly like an AppleTV.
I'm not sure about adding full compatibility with it.

Cannot send raw string with image content

If I have a string with raw image data inside, I cannot send it:

airplay.view(image_data)

gems/airplay-1.0.2/lib/airplay/viewer.rb:61:in `expand_path': string contains null byte (ArgumentError)
    from gems/airplay-1.0.2/lib/airplay/viewer.rb:61:in `get_content'
    from gems/airplay-1.0.2/lib/airplay/viewer.rb:23:in `view'

This is because of the get_content method, the tests do not actually work for all data types. I previously created a :raw option for the old send_image method: sodabrew/airplay@master...patch-rawimage

I'd like to port this forward to 1.0 codebase, or find some alternative approach.

Airplay::CLI as a separate app?

The cli currently included in airplay provides some basic features, originally as an example.
Would it make sense to have it a separate gem (avoiding unused dependencies) or it should be as simple as possible and stay in the lib as an example implementation?

Terminating 1023 Actors.

Not sure about this one. I've been seeing this problem in varying degrees of high-numbers (from as few as 20 to as many as 1023). Here's the log:

^C[2013-10-08 13:04:39] INFO going to shutdown ...
[2013-10-08 13:05:02] INFO WEBrick::HTTPServer#start done.
Exiting
Terminating 1023 actors...
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait
Terminating task: type=:timer, meta=nil, status=:sleeping
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:call, meta={:method_name=>:get}, status=:callwait
Terminating task: type=:timer, meta=nil, status=:callwait......and so on

Add a node without browsing

Currently the only way to find a node is to search for it in the LAN.
The idea is to allow to "hardcode" node ips and names.
This will allow to control an AppleTV even if it's outside the LAN

Proposed API:

Airplay.devices.add("ChinaTV", "555.555.555.555:7000")

DNSSD operation failed with error code: -65540 (DNSSD::BadParamError)

Somehow airplay stopped working for me. I always get this error:

/Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:253:in `_resolve': DNSSD operation failed with error code: -65540 (DNSSD::BadParamError)
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:253:in `resolve'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay/browser.rb:121:in `resolve'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay/browser.rb:26:in `block (2 levels) in browse'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:164:in `process'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dnssd-2.0/lib/dnssd/service.rb:66:in `browse'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dnssd-2.0/lib/dnssd.rb:178:in `run'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dnssd-2.0/lib/dnssd.rb:86:in `browse!'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay/browser.rb:25:in `block in browse'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/timeout.rb:97:in `timeout'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay/browser.rb:24:in `browse'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay.rb:34:in `browse'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay.rb:62:in `devices'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-1.0.2/lib/airplay/cli.rb:46:in `list'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/clap-1.0.0/lib/clap.rb:35:in `call'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/clap-1.0.0/lib/clap.rb:35:in `run'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/clap-1.0.0/lib/clap.rb:6:in `run'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/airplay-cli-1.0.1/bin/air:8:in `<top (required)>'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/bin/air:23:in `load'
  from /Users/bodo/.rbenv/versions/2.0.0-p247/bin/air:23:in `<main>'

BSOD - Black Screen of Death

For some reason (an open socket probably) the AppleTV is not doing nothing useful when I send the stop command.
I'll need further investigation.

ERROR persistent: Net::PTTH crashed!

Couple different errors came up while I left the server running. After a few minutes of no interaction between the Apple TV and the rails server, it throws the following errors:

ERROR persistent: Net::PTTH crashed!
Net::PTTH::SocketError: Couldn't reconnect! Errno::EPIPE
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.17/lib/net/ptth/socket.rb:24:in rescue in write' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.17/lib/net/ptth/socket.rb:15:inwrite'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.17/lib/net/ptth.rb:155:in block in keep_connection_active' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'

ERROR persistent: Net::PTTH crashed!
Net::PTTH::SocketError: Couldn't reconnect! Errno::EPIPE
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.17/lib/net/ptth/socket.rb:24:in rescue in write' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.17/lib/net/ptth/socket.rb:15:inwrite'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/net-ptth-0.0.17/lib/net/ptth.rb:155:in block in keep_connection_active' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task'
/Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p247/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'

0.1.5 is not working for me using Airserver 2.2.1

Updated both airplay and airserver, maybe the Airserver update broke everything but image streaming is not working for me right now on my setup. Can't try it with a real Apple TV at the moment. Streaming images from my iPod to Airserver seems to work.

Thoughts?

TPPH Support

Part of the development for the server can be used to support the reverse http events when playing media.

Server implementation

The client has almost everything ready.
We need to start the server implementation

Add live conversion to airplay-cli

in #48 there was a discussion on the supported formats that the lib should take in consideration. Since encoding is out of the lib scope a live conversion feature will be added to airplay-cli so it also works as an example implementation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.