百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

airplay

> 编程语言
开源

Airplay 绑定到 Ruby

1.1K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Airplay 绑定到 Ruby

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

  • Contribute
  • Installation
  • Usage
    • CLI
    • Library
  • Testing
  • Documentation
  • Contributors

Installation

Library

gem install airplay

CLI

gem install airplay-cli

Usage

CLI

View devices

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]

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"]  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.

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

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言