airplay 0.2.6 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -1
- data/README.md +1 -1
- data/airplay.gemspec +9 -9
- data/lib/airplay/client.rb +7 -3
- data/lib/airplay/protocol.rb +45 -25
- data/lib/airplay/protocol/image.rb +7 -8
- data/lib/airplay/server/browser.rb +5 -5
- data/test/authentication.rb +1 -1
- data/test/discovery.rb +1 -1
- data/test/fixtures/cassettes/airplay/authenticate_all_the_things_.yml +105 -101
- data/test/fixtures/cassettes/airplay/control_a_video_being_played_in_apple_tv.yml +190 -169
- data/test/fixtures/cassettes/airplay/get_current_scrub_from_apple_tv.yml +51 -47
- data/test/fixtures/cassettes/airplay/go_to_a_given_position_in_the_video.yml +124 -108
- data/test/fixtures/cassettes/airplay/send_audio_to_apple_tv.yml +26 -22
- data/test/fixtures/cassettes/airplay/send_image_to_apple_tv.yml +628 -606
- data/test/fixtures/cassettes/airplay/send_image_to_apple_tv_with_effects.yml +563 -545
- data/test/fixtures/cassettes/airplay/send_video_to_apple_tv.yml +26 -22
- data/test/helper.rb +6 -3
- data/test/images.rb +2 -3
- data/test/media.rb +3 -3
- data/test/scrub.rb +2 -2
- metadata +48 -32
@@ -1,221 +1,242 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
method:
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
5
|
uri: http://mocktv.local:7000/play
|
6
|
-
body:
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
base64_string: |
|
9
|
+
Q29udGVudC1Mb2NhdGlvbjogaHR0cDovL3d3dy55by15by5vcmcvbXA0L3l1
|
10
|
+
Lm1wNApTdGFydC1Qb3NpdGlvbjogMAo=
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
'
|
11
|
-
headers:
|
12
|
-
user-agent:
|
12
|
+
headers:
|
13
|
+
user-agent:
|
13
14
|
- MediaControl/1.0
|
14
|
-
connection:
|
15
|
+
connection:
|
15
16
|
- keep-alive
|
16
|
-
keep-alive:
|
17
|
+
keep-alive:
|
17
18
|
- 30
|
18
|
-
response:
|
19
|
-
status:
|
19
|
+
response:
|
20
|
+
status:
|
20
21
|
code: 200
|
21
22
|
message: OK
|
22
|
-
headers:
|
23
|
-
date:
|
24
|
-
-
|
25
|
-
content-length:
|
26
|
-
-
|
27
|
-
body:
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
33
35
|
uri: http://mocktv.local:7000/rate?value=0
|
34
|
-
body:
|
35
|
-
|
36
|
-
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
base64_string: ""
|
39
|
+
headers:
|
40
|
+
user-agent:
|
37
41
|
- MediaControl/1.0
|
38
|
-
connection:
|
42
|
+
connection:
|
39
43
|
- keep-alive
|
40
|
-
keep-alive:
|
44
|
+
keep-alive:
|
41
45
|
- 30
|
42
|
-
response:
|
43
|
-
status:
|
44
|
-
code:
|
45
|
-
message:
|
46
|
-
headers:
|
47
|
-
date:
|
48
|
-
-
|
49
|
-
content-length:
|
50
|
-
-
|
51
|
-
body:
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
57
62
|
uri: http://mocktv.local:7000/rate?value=1
|
58
|
-
body:
|
59
|
-
|
60
|
-
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
base64_string: ""
|
66
|
+
headers:
|
67
|
+
user-agent:
|
61
68
|
- MediaControl/1.0
|
62
|
-
connection:
|
69
|
+
connection:
|
63
70
|
- keep-alive
|
64
|
-
keep-alive:
|
71
|
+
keep-alive:
|
65
72
|
- 30
|
66
|
-
response:
|
67
|
-
status:
|
68
|
-
code:
|
69
|
-
message:
|
70
|
-
headers:
|
71
|
-
date:
|
72
|
-
-
|
73
|
-
content-length:
|
74
|
-
-
|
75
|
-
body:
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
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
|
81
89
|
uri: http://mocktv.local:7000/scrub
|
82
|
-
body:
|
83
|
-
|
84
|
-
|
90
|
+
body:
|
91
|
+
encoding: US-ASCII
|
92
|
+
base64_string: ""
|
93
|
+
headers:
|
94
|
+
user-agent:
|
85
95
|
- MediaControl/1.0
|
86
|
-
content-type:
|
96
|
+
content-type:
|
87
97
|
- text/x-apple-plist+xml
|
88
|
-
connection:
|
98
|
+
connection:
|
89
99
|
- keep-alive
|
90
|
-
keep-alive:
|
100
|
+
keep-alive:
|
91
101
|
- 30
|
92
|
-
response:
|
93
|
-
status:
|
102
|
+
response:
|
103
|
+
status:
|
94
104
|
code: 200
|
95
105
|
message: OK
|
96
|
-
headers:
|
97
|
-
date:
|
98
|
-
-
|
99
|
-
content-type:
|
106
|
+
headers:
|
107
|
+
date:
|
108
|
+
- Fri, 23 Mar 2012 22:40:35 GMT
|
109
|
+
content-type:
|
100
110
|
- text/parameters
|
101
|
-
content-length:
|
102
|
-
-
|
103
|
-
body:
|
111
|
+
content-length:
|
112
|
+
- "38"
|
113
|
+
body:
|
114
|
+
encoding: US-ASCII
|
115
|
+
base64_string: |
|
116
|
+
ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
|
104
117
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
ignored: false
|
110
|
-
- !ruby/struct:VCR::HTTPInteraction
|
111
|
-
request: !ruby/struct:VCR::Request
|
112
|
-
method: :get
|
118
|
+
http_version: "1.1"
|
119
|
+
recorded_at: Fri, 23 Mar 2012 22:40:36 GMT
|
120
|
+
- request:
|
121
|
+
method: get
|
113
122
|
uri: http://mocktv.local:7000/scrub
|
114
|
-
body:
|
115
|
-
|
116
|
-
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
base64_string: ""
|
126
|
+
headers:
|
127
|
+
user-agent:
|
117
128
|
- MediaControl/1.0
|
118
|
-
content-type:
|
129
|
+
content-type:
|
119
130
|
- text/x-apple-plist+xml
|
120
|
-
connection:
|
131
|
+
connection:
|
121
132
|
- keep-alive
|
122
|
-
keep-alive:
|
133
|
+
keep-alive:
|
123
134
|
- 30
|
124
|
-
response:
|
125
|
-
status:
|
135
|
+
response:
|
136
|
+
status:
|
126
137
|
code: 200
|
127
138
|
message: OK
|
128
|
-
headers:
|
129
|
-
date:
|
130
|
-
-
|
131
|
-
content-type:
|
139
|
+
headers:
|
140
|
+
date:
|
141
|
+
- Fri, 23 Mar 2012 22:40:40 GMT
|
142
|
+
content-type:
|
132
143
|
- text/parameters
|
133
|
-
content-length:
|
134
|
-
-
|
135
|
-
body:
|
136
|
-
|
137
|
-
|
144
|
+
content-length:
|
145
|
+
- "38"
|
146
|
+
body:
|
147
|
+
encoding: US-ASCII
|
148
|
+
base64_string: |
|
149
|
+
ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
|
138
150
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
request: !ruby/struct:VCR::Request
|
144
|
-
method: :get
|
151
|
+
http_version: "1.1"
|
152
|
+
recorded_at: Fri, 23 Mar 2012 22:40:41 GMT
|
153
|
+
- request:
|
154
|
+
method: get
|
145
155
|
uri: http://mocktv.local:7000/scrub
|
146
|
-
body:
|
147
|
-
|
148
|
-
|
156
|
+
body:
|
157
|
+
encoding: US-ASCII
|
158
|
+
base64_string: ""
|
159
|
+
headers:
|
160
|
+
user-agent:
|
149
161
|
- MediaControl/1.0
|
150
|
-
content-type:
|
162
|
+
content-type:
|
151
163
|
- text/x-apple-plist+xml
|
152
|
-
connection:
|
164
|
+
connection:
|
153
165
|
- keep-alive
|
154
|
-
keep-alive:
|
166
|
+
keep-alive:
|
155
167
|
- 30
|
156
|
-
response:
|
157
|
-
status:
|
168
|
+
response:
|
169
|
+
status:
|
158
170
|
code: 200
|
159
171
|
message: OK
|
160
|
-
headers:
|
161
|
-
date:
|
162
|
-
-
|
163
|
-
content-type:
|
172
|
+
headers:
|
173
|
+
date:
|
174
|
+
- Fri, 23 Mar 2012 22:40:45 GMT
|
175
|
+
content-type:
|
164
176
|
- text/parameters
|
165
|
-
content-length:
|
166
|
-
-
|
167
|
-
body:
|
177
|
+
content-length:
|
178
|
+
- "38"
|
179
|
+
body:
|
180
|
+
encoding: US-ASCII
|
181
|
+
base64_string: |
|
182
|
+
ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
|
168
183
|
|
169
|
-
|
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
|
170
190
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
method: :post
|
177
|
-
uri: http://mocktv.local:7000/scrub?position=18
|
178
|
-
body: !!null
|
179
|
-
headers:
|
180
|
-
user-agent:
|
191
|
+
body:
|
192
|
+
encoding: US-ASCII
|
193
|
+
base64_string: ""
|
194
|
+
headers:
|
195
|
+
user-agent:
|
181
196
|
- MediaControl/1.0
|
182
|
-
connection:
|
197
|
+
connection:
|
183
198
|
- keep-alive
|
184
|
-
keep-alive:
|
199
|
+
keep-alive:
|
185
200
|
- 30
|
186
|
-
response:
|
187
|
-
status:
|
188
|
-
code:
|
189
|
-
message:
|
190
|
-
headers:
|
191
|
-
date:
|
192
|
-
-
|
193
|
-
content-length:
|
194
|
-
-
|
195
|
-
body:
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
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
|
201
217
|
uri: http://mocktv.local:7000/stop
|
202
|
-
body:
|
203
|
-
|
204
|
-
|
218
|
+
body:
|
219
|
+
encoding: US-ASCII
|
220
|
+
base64_string: ""
|
221
|
+
headers:
|
222
|
+
user-agent:
|
205
223
|
- MediaControl/1.0
|
206
|
-
connection:
|
224
|
+
connection:
|
207
225
|
- keep-alive
|
208
|
-
keep-alive:
|
226
|
+
keep-alive:
|
209
227
|
- 30
|
210
|
-
response:
|
211
|
-
status:
|
228
|
+
response:
|
229
|
+
status:
|
212
230
|
code: 200
|
213
231
|
message: OK
|
214
|
-
headers:
|
215
|
-
date:
|
216
|
-
-
|
217
|
-
content-length:
|
218
|
-
-
|
219
|
-
body:
|
220
|
-
|
221
|
-
|
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,65 +1,69 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
method:
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
5
|
uri: http://mocktv.local:7000/scrub
|
6
|
-
body:
|
7
|
-
|
8
|
-
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
base64_string: ""
|
9
|
+
headers:
|
10
|
+
user-agent:
|
9
11
|
- MediaControl/1.0
|
10
|
-
content-type:
|
12
|
+
content-type:
|
11
13
|
- text/x-apple-plist+xml
|
12
|
-
connection:
|
14
|
+
connection:
|
13
15
|
- keep-alive
|
14
|
-
keep-alive:
|
16
|
+
keep-alive:
|
15
17
|
- 30
|
16
|
-
response:
|
17
|
-
status:
|
18
|
+
response:
|
19
|
+
status:
|
18
20
|
code: 200
|
19
21
|
message: OK
|
20
|
-
headers:
|
21
|
-
date:
|
22
|
-
-
|
23
|
-
content-type:
|
22
|
+
headers:
|
23
|
+
date:
|
24
|
+
- Fri, 23 Mar 2012 22:41:06 GMT
|
25
|
+
content-type:
|
24
26
|
- text/parameters
|
25
|
-
content-length:
|
26
|
-
-
|
27
|
-
body:
|
27
|
+
content-length:
|
28
|
+
- "38"
|
29
|
+
body:
|
30
|
+
encoding: US-ASCII
|
31
|
+
base64_string: |
|
32
|
+
ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
|
28
33
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
ignored: false
|
34
|
-
- !ruby/struct:VCR::HTTPInteraction
|
35
|
-
request: !ruby/struct:VCR::Request
|
36
|
-
method: :get
|
34
|
+
http_version: "1.1"
|
35
|
+
recorded_at: Fri, 23 Mar 2012 22:41:06 GMT
|
36
|
+
- request:
|
37
|
+
method: get
|
37
38
|
uri: http://mocktv.local:7000/scrub
|
38
|
-
body:
|
39
|
-
|
40
|
-
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
base64_string: ""
|
42
|
+
headers:
|
43
|
+
user-agent:
|
41
44
|
- MediaControl/1.0
|
42
|
-
content-type:
|
45
|
+
content-type:
|
43
46
|
- text/x-apple-plist+xml
|
44
|
-
connection:
|
47
|
+
connection:
|
45
48
|
- keep-alive
|
46
|
-
keep-alive:
|
49
|
+
keep-alive:
|
47
50
|
- 30
|
48
|
-
response:
|
49
|
-
status:
|
51
|
+
response:
|
52
|
+
status:
|
50
53
|
code: 200
|
51
54
|
message: OK
|
52
|
-
headers:
|
53
|
-
date:
|
54
|
-
-
|
55
|
-
content-type:
|
55
|
+
headers:
|
56
|
+
date:
|
57
|
+
- Fri, 23 Mar 2012 22:41:11 GMT
|
58
|
+
content-type:
|
56
59
|
- text/parameters
|
57
|
-
content-length:
|
58
|
-
-
|
59
|
-
body:
|
60
|
-
|
61
|
-
|
60
|
+
content-length:
|
61
|
+
- "38"
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
base64_string: |
|
65
|
+
ZHVyYXRpb246IDAuMDAwMDAwCnBvc2l0aW9uOiAwLjAwMDAwMAo=
|
62
66
|
|
63
|
-
|
64
|
-
|
65
|
-
|
67
|
+
http_version: "1.1"
|
68
|
+
recorded_at: Fri, 23 Mar 2012 22:41:11 GMT
|
69
|
+
recorded_with: VCR 2.0.0
|