airplay 0.2.9 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/Gemfile +5 -0
  2. data/Gemfile.lock +68 -0
  3. data/HUGS +15 -0
  4. data/LICENSE +20 -0
  5. data/README.md +50 -72
  6. data/Rakefile +6 -9
  7. data/SPEC.md +34 -0
  8. data/airplay.gemspec +28 -16
  9. data/bin/air +27 -0
  10. data/examples/demo.rb +35 -0
  11. data/examples/image.rb +9 -0
  12. data/examples/video.rb +24 -0
  13. data/lib/airplay.rb +38 -17
  14. data/lib/airplay/browser.rb +68 -0
  15. data/lib/airplay/cli.rb +104 -0
  16. data/lib/airplay/configuration.rb +29 -0
  17. data/lib/airplay/connection.rb +114 -0
  18. data/lib/airplay/connection/authentication.rb +37 -0
  19. data/lib/airplay/connection/persistent.rb +44 -0
  20. data/lib/airplay/device.rb +81 -0
  21. data/lib/airplay/device/features.rb +43 -0
  22. data/lib/airplay/device/info.rb +22 -0
  23. data/lib/airplay/devices.rb +46 -0
  24. data/lib/airplay/logger.rb +20 -0
  25. data/lib/airplay/playable.rb +24 -0
  26. data/lib/airplay/protocol.rb +9 -72
  27. data/lib/airplay/protocol/app.rb +52 -0
  28. data/lib/airplay/protocol/message.rb +8 -0
  29. data/lib/airplay/protocol/playback_info.rb +49 -0
  30. data/lib/airplay/protocol/player.rb +170 -0
  31. data/lib/airplay/protocol/reverse.rb +69 -0
  32. data/lib/airplay/protocol/slideshow.rb +66 -0
  33. data/lib/airplay/protocol/timers.rb +25 -0
  34. data/lib/airplay/protocol/viewer.rb +56 -0
  35. data/lib/airplay/structure.rb +7 -0
  36. data/lib/airplay/viewable.rb +16 -0
  37. data/test/fixtures/cassettes/airplay/listing_slideshow_features.yml +201 -0
  38. data/test/fixtures/cassettes/airplay/play_an_entire_video.yml +100 -0
  39. data/test/fixtures/cassettes/airplay/sending_a_video.yml +71 -0
  40. data/test/fixtures/cassettes/airplay/sending_an_image.yml +26439 -0
  41. data/test/fixtures/cassettes/airplay/stop_any_transmission.yml +8851 -0
  42. data/test/fixtures/files/logo.png +0 -0
  43. data/test/fixtures/files/transition_0.png +0 -0
  44. data/test/fixtures/files/transition_1.png +0 -0
  45. data/test/fixtures/files/transition_2.png +0 -0
  46. data/test/fixtures/files/transition_3.png +0 -0
  47. data/test/integration/discovery_test.rb +13 -0
  48. data/test/integration/features_test.rb +14 -0
  49. data/test/integration/send_media_test.rb +37 -0
  50. data/test/integration/slideshow_test.rb +26 -0
  51. data/test/test_helper.rb +42 -0
  52. data/test/unit/node_test.rb +17 -0
  53. data/test/unit/protocol_test.rb +44 -0
  54. metadata +247 -77
  55. data/.gitignore +0 -2
  56. data/.travis.yml +0 -6
  57. data/examples/jobs.jpg +0 -0
  58. data/examples/send_image.rb +0 -5
  59. data/examples/send_video.rb +0 -7
  60. data/lib/airplay/client.rb +0 -60
  61. data/lib/airplay/protocol/image.rb +0 -41
  62. data/lib/airplay/protocol/media.rb +0 -64
  63. data/lib/airplay/protocol/scrub.rb +0 -37
  64. data/lib/airplay/server.rb +0 -2
  65. data/lib/airplay/server/browser.rb +0 -35
  66. data/lib/airplay/server/node.rb +0 -7
  67. data/test/authentication.rb +0 -13
  68. data/test/discovery.rb +0 -27
  69. data/test/fixtures/cassettes/airplay/authenticate_all_the_things_.yml +0 -139
  70. data/test/fixtures/cassettes/airplay/control_a_video_being_played_in_apple_tv.yml +0 -242
  71. data/test/fixtures/cassettes/airplay/get_current_scrub_from_apple_tv.yml +0 -69
  72. data/test/fixtures/cassettes/airplay/go_to_a_given_position_in_the_video.yml +0 -157
  73. data/test/fixtures/cassettes/airplay/send_audio_to_apple_tv.yml +0 -33
  74. data/test/fixtures/cassettes/airplay/send_image_to_apple_tv.yml +0 -661
  75. data/test/fixtures/cassettes/airplay/send_image_to_apple_tv_with_effects.yml +0 -591
  76. data/test/fixtures/cassettes/airplay/send_video_to_apple_tv.yml +0 -33
  77. data/test/fixtures/image.gif +0 -0
  78. data/test/fixtures/image2.gif +0 -0
  79. data/test/helper.rb +0 -31
  80. data/test/images.rb +0 -31
  81. data/test/media.rb +0 -47
  82. data/test/scrub.rb +0 -31
@@ -1,242 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://mocktv.local:7000/play
6
- body:
7
- encoding: US-ASCII
8
- base64_string: |
9
- Q29udGVudC1Mb2NhdGlvbjogaHR0cDovL3d3dy55by15by5vcmcvbXA0L3l1
10
- Lm1wNApTdGFydC1Qb3NpdGlvbjogMAo=
11
-
12
- headers:
13
- user-agent:
14
- - MediaControl/1.0
15
- connection:
16
- - keep-alive
17
- keep-alive:
18
- - 30
19
- response:
20
- status:
21
- code: 200
22
- message: OK
23
- headers:
24
- date:
25
- - Fri, 23 Mar 2012 22:40:20 GMT
26
- content-length:
27
- - "0"
28
- body:
29
- encoding: US-ASCII
30
- base64_string: ""
31
- http_version: "1.1"
32
- recorded_at: Fri, 23 Mar 2012 22:40:21 GMT
33
- - request:
34
- method: post
35
- uri: http://mocktv.local:7000/rate?value=0
36
- body:
37
- encoding: US-ASCII
38
- base64_string: ""
39
- headers:
40
- user-agent:
41
- - MediaControl/1.0
42
- connection:
43
- - keep-alive
44
- keep-alive:
45
- - 30
46
- response:
47
- status:
48
- code: 500
49
- message: Internal Server Error
50
- headers:
51
- date:
52
- - Fri, 23 Mar 2012 22:40:25 GMT
53
- content-length:
54
- - "0"
55
- body:
56
- encoding: US-ASCII
57
- base64_string: ""
58
- http_version: "1.1"
59
- recorded_at: Fri, 23 Mar 2012 22:40:26 GMT
60
- - request:
61
- method: post
62
- uri: http://mocktv.local:7000/rate?value=1
63
- body:
64
- encoding: US-ASCII
65
- base64_string: ""
66
- headers:
67
- user-agent:
68
- - MediaControl/1.0
69
- connection:
70
- - keep-alive
71
- keep-alive:
72
- - 30
73
- response:
74
- status:
75
- code: 500
76
- message: Internal Server Error
77
- headers:
78
- date:
79
- - Fri, 23 Mar 2012 22:40:30 GMT
80
- content-length:
81
- - "0"
82
- body:
83
- encoding: US-ASCII
84
- base64_string: ""
85
- http_version: "1.1"
86
- recorded_at: Fri, 23 Mar 2012 22:40:31 GMT
87
- - request:
88
- method: get
89
- uri: http://mocktv.local:7000/scrub
90
- body:
91
- encoding: US-ASCII
92
- base64_string: ""
93
- headers:
94
- user-agent:
95
- - MediaControl/1.0
96
- content-type:
97
- - text/x-apple-plist+xml
98
- connection:
99
- - keep-alive
100
- keep-alive:
101
- - 30
102
- response:
103
- status:
104
- code: 200
105
- message: OK
106
- headers:
107
- date:
108
- - Fri, 23 Mar 2012 22:40:35 GMT
109
- content-type:
110
- - text/parameters
111
- content-length:
112
- - "38"
113
- body:
114
- encoding: US-ASCII
115
- base64_string: |
116
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
117
-
118
- http_version: "1.1"
119
- recorded_at: Fri, 23 Mar 2012 22:40:36 GMT
120
- - request:
121
- method: get
122
- uri: http://mocktv.local:7000/scrub
123
- body:
124
- encoding: US-ASCII
125
- base64_string: ""
126
- headers:
127
- user-agent:
128
- - MediaControl/1.0
129
- content-type:
130
- - text/x-apple-plist+xml
131
- connection:
132
- - keep-alive
133
- keep-alive:
134
- - 30
135
- response:
136
- status:
137
- code: 200
138
- message: OK
139
- headers:
140
- date:
141
- - Fri, 23 Mar 2012 22:40:40 GMT
142
- content-type:
143
- - text/parameters
144
- content-length:
145
- - "38"
146
- body:
147
- encoding: US-ASCII
148
- base64_string: |
149
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
150
-
151
- http_version: "1.1"
152
- recorded_at: Fri, 23 Mar 2012 22:40:41 GMT
153
- - request:
154
- method: get
155
- uri: http://mocktv.local:7000/scrub
156
- body:
157
- encoding: US-ASCII
158
- base64_string: ""
159
- headers:
160
- user-agent:
161
- - MediaControl/1.0
162
- content-type:
163
- - text/x-apple-plist+xml
164
- connection:
165
- - keep-alive
166
- keep-alive:
167
- - 30
168
- response:
169
- status:
170
- code: 200
171
- message: OK
172
- headers:
173
- date:
174
- - Fri, 23 Mar 2012 22:40:45 GMT
175
- content-type:
176
- - text/parameters
177
- content-length:
178
- - "38"
179
- body:
180
- encoding: US-ASCII
181
- base64_string: |
182
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
183
-
184
- http_version: "1.1"
185
- recorded_at: Fri, 23 Mar 2012 22:40:46 GMT
186
- - request:
187
- method: post
188
- uri: |
189
- http://mocktv.local:7000/scrub?position=0
190
-
191
- body:
192
- encoding: US-ASCII
193
- base64_string: ""
194
- headers:
195
- user-agent:
196
- - MediaControl/1.0
197
- connection:
198
- - keep-alive
199
- keep-alive:
200
- - 30
201
- response:
202
- status:
203
- code: 500
204
- message: Internal Server Error
205
- headers:
206
- date:
207
- - Fri, 23 Mar 2012 22:40:50 GMT
208
- content-length:
209
- - "0"
210
- body:
211
- encoding: US-ASCII
212
- base64_string: ""
213
- http_version: "1.1"
214
- recorded_at: Fri, 23 Mar 2012 22:40:51 GMT
215
- - request:
216
- method: post
217
- uri: http://mocktv.local:7000/stop
218
- body:
219
- encoding: US-ASCII
220
- base64_string: ""
221
- headers:
222
- user-agent:
223
- - MediaControl/1.0
224
- connection:
225
- - keep-alive
226
- keep-alive:
227
- - 30
228
- response:
229
- status:
230
- code: 200
231
- message: OK
232
- headers:
233
- date:
234
- - Fri, 23 Mar 2012 22:40:55 GMT
235
- content-length:
236
- - "0"
237
- body:
238
- encoding: US-ASCII
239
- base64_string: ""
240
- http_version: "1.1"
241
- recorded_at: Fri, 23 Mar 2012 22:40:56 GMT
242
- recorded_with: VCR 2.0.0
@@ -1,69 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://mocktv.local:7000/scrub
6
- body:
7
- encoding: US-ASCII
8
- base64_string: ""
9
- headers:
10
- user-agent:
11
- - MediaControl/1.0
12
- content-type:
13
- - text/x-apple-plist+xml
14
- connection:
15
- - keep-alive
16
- keep-alive:
17
- - 30
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- date:
24
- - Fri, 23 Mar 2012 22:41:06 GMT
25
- content-type:
26
- - text/parameters
27
- content-length:
28
- - "38"
29
- body:
30
- encoding: US-ASCII
31
- base64_string: |
32
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
33
-
34
- http_version: "1.1"
35
- recorded_at: Fri, 23 Mar 2012 22:41:06 GMT
36
- - request:
37
- method: get
38
- uri: http://mocktv.local:7000/scrub
39
- body:
40
- encoding: US-ASCII
41
- base64_string: ""
42
- headers:
43
- user-agent:
44
- - MediaControl/1.0
45
- content-type:
46
- - text/x-apple-plist+xml
47
- connection:
48
- - keep-alive
49
- keep-alive:
50
- - 30
51
- response:
52
- status:
53
- code: 200
54
- message: OK
55
- headers:
56
- date:
57
- - Fri, 23 Mar 2012 22:41:11 GMT
58
- content-type:
59
- - text/parameters
60
- content-length:
61
- - "38"
62
- body:
63
- encoding: US-ASCII
64
- base64_string: |
65
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
66
-
67
- http_version: "1.1"
68
- recorded_at: Fri, 23 Mar 2012 22:41:11 GMT
69
- recorded_with: VCR 2.0.0
@@ -1,157 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://mocktv.local:7000/play
6
- body:
7
- encoding: US-ASCII
8
- base64_string: |
9
- Q29udGVudC1Mb2NhdGlvbjogaHR0cDovL3d3dy55by15by5vcmcvbXA0L3l1
10
- Lm1wNApTdGFydC1Qb3NpdGlvbjogMAo=
11
-
12
- headers:
13
- user-agent:
14
- - MediaControl/1.0
15
- connection:
16
- - keep-alive
17
- keep-alive:
18
- - 30
19
- response:
20
- status:
21
- code: 200
22
- message: OK
23
- headers:
24
- date:
25
- - Fri, 23 Mar 2012 22:41:16 GMT
26
- content-length:
27
- - "0"
28
- body:
29
- encoding: US-ASCII
30
- base64_string: ""
31
- http_version: "1.1"
32
- recorded_at: Fri, 23 Mar 2012 22:41:17 GMT
33
- - request:
34
- method: get
35
- uri: http://mocktv.local:7000/scrub
36
- body:
37
- encoding: US-ASCII
38
- base64_string: ""
39
- headers:
40
- user-agent:
41
- - MediaControl/1.0
42
- content-type:
43
- - text/x-apple-plist+xml
44
- connection:
45
- - keep-alive
46
- keep-alive:
47
- - 30
48
- response:
49
- status:
50
- code: 200
51
- message: OK
52
- headers:
53
- date:
54
- - Fri, 23 Mar 2012 22:41:21 GMT
55
- content-type:
56
- - text/parameters
57
- content-length:
58
- - "38"
59
- body:
60
- encoding: US-ASCII
61
- base64_string: |
62
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
63
-
64
- http_version: "1.1"
65
- recorded_at: Fri, 23 Mar 2012 22:41:22 GMT
66
- - request:
67
- method: post
68
- uri: |
69
- http://mocktv.local:7000/scrub?position=0
70
-
71
- body:
72
- encoding: US-ASCII
73
- base64_string: ""
74
- headers:
75
- user-agent:
76
- - MediaControl/1.0
77
- connection:
78
- - keep-alive
79
- keep-alive:
80
- - 30
81
- response:
82
- status:
83
- code: 500
84
- message: Internal Server Error
85
- headers:
86
- date:
87
- - Fri, 23 Mar 2012 22:41:26 GMT
88
- content-length:
89
- - "0"
90
- body:
91
- encoding: US-ASCII
92
- base64_string: ""
93
- http_version: "1.1"
94
- recorded_at: Fri, 23 Mar 2012 22:41:27 GMT
95
- - request:
96
- method: get
97
- uri: http://mocktv.local:7000/scrub
98
- body:
99
- encoding: US-ASCII
100
- base64_string: ""
101
- headers:
102
- user-agent:
103
- - MediaControl/1.0
104
- content-type:
105
- - text/x-apple-plist+xml
106
- connection:
107
- - keep-alive
108
- keep-alive:
109
- - 30
110
- response:
111
- status:
112
- code: 200
113
- message: OK
114
- headers:
115
- date:
116
- - Fri, 23 Mar 2012 22:41:31 GMT
117
- content-type:
118
- - text/parameters
119
- content-length:
120
- - "38"
121
- body:
122
- encoding: US-ASCII
123
- base64_string: |
124
- ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
125
-
126
- http_version: "1.1"
127
- recorded_at: Fri, 23 Mar 2012 22:41:32 GMT
128
- - request:
129
- method: post
130
- uri: |
131
- http://mocktv.local:7000/scrub?position=0
132
-
133
- body:
134
- encoding: US-ASCII
135
- base64_string: ""
136
- headers:
137
- user-agent:
138
- - MediaControl/1.0
139
- connection:
140
- - keep-alive
141
- keep-alive:
142
- - 30
143
- response:
144
- status:
145
- code: 500
146
- message: Internal Server Error
147
- headers:
148
- date:
149
- - Fri, 23 Mar 2012 22:41:36 GMT
150
- content-length:
151
- - "0"
152
- body:
153
- encoding: US-ASCII
154
- base64_string: ""
155
- http_version: "1.1"
156
- recorded_at: Fri, 23 Mar 2012 22:41:37 GMT
157
- recorded_with: VCR 2.0.0