airplay 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/airplay.gemspec +2 -1
- data/examples/jobs.jpg +0 -0
- data/examples/send_image.rb +5 -0
- data/examples/send_video.rb +7 -0
- data/lib/airplay.rb +2 -1
- data/lib/airplay/protocol.rb +7 -6
- data/test/fixtures/cassettes/airplay/authenticate_all_the_things_.yml +36 -16
- data/test/fixtures/cassettes/airplay/control_a_video_being_played_in_apple_tv.yml +48 -16
- data/test/fixtures/cassettes/airplay/get_current_scrub_from_apple_tv.yml +12 -4
- data/test/fixtures/cassettes/airplay/go_to_a_given_position_in_the_video.yml +30 -10
- data/test/fixtures/cassettes/airplay/send_audio_to_apple_tv.yml +6 -2
- data/test/fixtures/cassettes/airplay/send_image_to_apple_tv.yml +399 -1171
- data/test/fixtures/cassettes/airplay/send_image_to_apple_tv_with_effects.yml +24 -8
- data/test/fixtures/cassettes/airplay/send_video_to_apple_tv.yml +6 -22
- data/test/helper.rb +1 -1
- data/test/images.rb +1 -1
- metadata +28 -14
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :put
|
5
|
-
uri: http://
|
5
|
+
uri: http://192.168.1.101:7000/photo
|
6
6
|
body: !binary |-
|
7
7
|
R0lGODdhAAXQAuMAAMzMzJaWlsXFxb6+vre3t6Ojo7GxsZycnKqqqgAAAAAA
|
8
8
|
AAAAAAAAAAAAAAAAAAAAACwAAAAAAAXQAgAE/hDISau9OOvNu/9gKI5kaZ5o
|
@@ -126,13 +126,17 @@
|
|
126
126
|
- MediaControl/1.0
|
127
127
|
x-apple-transition:
|
128
128
|
- None
|
129
|
+
connection:
|
130
|
+
- keep-alive
|
131
|
+
keep-alive:
|
132
|
+
- 30
|
129
133
|
response: !ruby/struct:VCR::Response
|
130
134
|
status: !ruby/struct:VCR::ResponseStatus
|
131
135
|
code: 200
|
132
136
|
message: OK
|
133
137
|
headers:
|
134
138
|
date:
|
135
|
-
- Thu,
|
139
|
+
- Thu, 13 Oct 2011 01:39:11 GMT
|
136
140
|
content-length:
|
137
141
|
- '0'
|
138
142
|
body: !!null
|
@@ -141,7 +145,7 @@
|
|
141
145
|
- !ruby/struct:VCR::HTTPInteraction
|
142
146
|
request: !ruby/struct:VCR::Request
|
143
147
|
method: :put
|
144
|
-
uri: http://
|
148
|
+
uri: http://192.168.1.101:7000/photo
|
145
149
|
body: !binary |-
|
146
150
|
R0lGODdhAAXQAuMAAMzMzJaWlsXFxb6+vre3t6Ojo7GxsZycnKqqqgAAAAAA
|
147
151
|
AAAAAAAAAAAAAAAAAAAAACwAAAAAAAXQAgAE/hDISau9OOvNu/9gKI5kaZ5o
|
@@ -265,13 +269,17 @@
|
|
265
269
|
- MediaControl/1.0
|
266
270
|
x-apple-transition:
|
267
271
|
- SlideLeft
|
272
|
+
connection:
|
273
|
+
- keep-alive
|
274
|
+
keep-alive:
|
275
|
+
- 30
|
268
276
|
response: !ruby/struct:VCR::Response
|
269
277
|
status: !ruby/struct:VCR::ResponseStatus
|
270
278
|
code: 200
|
271
279
|
message: OK
|
272
280
|
headers:
|
273
281
|
date:
|
274
|
-
- Thu,
|
282
|
+
- Thu, 13 Oct 2011 01:39:11 GMT
|
275
283
|
content-length:
|
276
284
|
- '0'
|
277
285
|
body: !!null
|
@@ -280,7 +288,7 @@
|
|
280
288
|
- !ruby/struct:VCR::HTTPInteraction
|
281
289
|
request: !ruby/struct:VCR::Request
|
282
290
|
method: :put
|
283
|
-
uri: http://
|
291
|
+
uri: http://192.168.1.101:7000/photo
|
284
292
|
body: !binary |-
|
285
293
|
R0lGODdhAAXQAuMAAMzMzJaWlsXFxb6+vre3t6Ojo7GxsZycnKqqqgAAAAAA
|
286
294
|
AAAAAAAAAAAAAAAAAAAAACwAAAAAAAXQAgAE/hDISau9OOvNu/9gKI5kaZ5o
|
@@ -404,13 +412,17 @@
|
|
404
412
|
- MediaControl/1.0
|
405
413
|
x-apple-transition:
|
406
414
|
- SlideRight
|
415
|
+
connection:
|
416
|
+
- keep-alive
|
417
|
+
keep-alive:
|
418
|
+
- 30
|
407
419
|
response: !ruby/struct:VCR::Response
|
408
420
|
status: !ruby/struct:VCR::ResponseStatus
|
409
421
|
code: 200
|
410
422
|
message: OK
|
411
423
|
headers:
|
412
424
|
date:
|
413
|
-
- Thu,
|
425
|
+
- Thu, 13 Oct 2011 01:39:11 GMT
|
414
426
|
content-length:
|
415
427
|
- '0'
|
416
428
|
body: !!null
|
@@ -419,7 +431,7 @@
|
|
419
431
|
- !ruby/struct:VCR::HTTPInteraction
|
420
432
|
request: !ruby/struct:VCR::Request
|
421
433
|
method: :put
|
422
|
-
uri: http://
|
434
|
+
uri: http://192.168.1.101:7000/photo
|
423
435
|
body: !binary |-
|
424
436
|
R0lGODdhAAXQAuMAAMzMzJaWlsXFxb6+vre3t6Ojo7GxsZycnKqqqgAAAAAA
|
425
437
|
AAAAAAAAAAAAAAAAAAAAACwAAAAAAAXQAgAE/hDISau9OOvNu/9gKI5kaZ5o
|
@@ -543,13 +555,17 @@
|
|
543
555
|
- MediaControl/1.0
|
544
556
|
x-apple-transition:
|
545
557
|
- Dissolve
|
558
|
+
connection:
|
559
|
+
- keep-alive
|
560
|
+
keep-alive:
|
561
|
+
- 30
|
546
562
|
response: !ruby/struct:VCR::Response
|
547
563
|
status: !ruby/struct:VCR::ResponseStatus
|
548
564
|
code: 200
|
549
565
|
message: OK
|
550
566
|
headers:
|
551
567
|
date:
|
552
|
-
- Thu,
|
568
|
+
- Thu, 13 Oct 2011 01:39:11 GMT
|
553
569
|
content-length:
|
554
570
|
- '0'
|
555
571
|
body: !!null
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: http://
|
5
|
+
uri: http://192.168.1.101:7000/play
|
6
6
|
body: ! 'Content-Location: http://www.yo-yo.org/mp4/yu.mp4
|
7
7
|
|
8
8
|
Start-Position: 0
|
@@ -11,33 +11,17 @@
|
|
11
11
|
headers:
|
12
12
|
user-agent:
|
13
13
|
- MediaControl/1.0
|
14
|
+
connection:
|
15
|
+
- keep-alive
|
16
|
+
keep-alive:
|
17
|
+
- 30
|
14
18
|
response: !ruby/struct:VCR::Response
|
15
19
|
status: !ruby/struct:VCR::ResponseStatus
|
16
20
|
code: 200
|
17
21
|
message: OK
|
18
22
|
headers:
|
19
23
|
date:
|
20
|
-
- Thu,
|
21
|
-
content-length:
|
22
|
-
- '0'
|
23
|
-
body: !!null
|
24
|
-
http_version: '1.1'
|
25
|
-
ignored: false
|
26
|
-
- !ruby/struct:VCR::HTTPInteraction
|
27
|
-
request: !ruby/struct:VCR::Request
|
28
|
-
method: :post
|
29
|
-
uri: http://10.1.0.220:7000/stop
|
30
|
-
body: !!null
|
31
|
-
headers:
|
32
|
-
user-agent:
|
33
|
-
- MediaControl/1.0
|
34
|
-
response: !ruby/struct:VCR::Response
|
35
|
-
status: !ruby/struct:VCR::ResponseStatus
|
36
|
-
code: 200
|
37
|
-
message: OK
|
38
|
-
headers:
|
39
|
-
date:
|
40
|
-
- Thu, 15 Sep 2011 14:55:22 GMT
|
24
|
+
- Thu, 13 Oct 2011 01:39:12 GMT
|
41
25
|
content-length:
|
42
26
|
- '0'
|
43
27
|
body: !!null
|
data/test/helper.rb
CHANGED
@@ -8,7 +8,7 @@ module MockedBrowser
|
|
8
8
|
attr_reader :servers
|
9
9
|
|
10
10
|
def self.browse
|
11
|
-
@servers = [Airplay::Server::Node.new("Mock TV", ".local", "
|
11
|
+
@servers = [Airplay::Server::Node.new("Mock TV", ".local", "192.168.1.101", 7000)]
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.find_by_name(name)
|
data/test/images.rb
CHANGED
@@ -17,7 +17,7 @@ scope do
|
|
17
17
|
file_path = "./test/fixtures/image2.gif"
|
18
18
|
assert @airplay.send_image(file_path).kind_of?(String)
|
19
19
|
assert @airplay.send_image(File.open(file_path)).kind_of?(String)
|
20
|
-
assert @airplay.send_image("http://
|
20
|
+
assert @airplay.send_image("http://cdn.mactrast.com/wp-content/uploads/2011/04/Steve-Jobs-Apple-CEO.jpg").kind_of?(String)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airplay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-10-13 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dnssd
|
16
|
-
requirement: &
|
16
|
+
requirement: &70151451240760 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,21 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70151451240760
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: net-http-persistent
|
27
|
+
requirement: &70151451239920 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70151451239920
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: net-http-digest_auth
|
27
|
-
requirement: &
|
38
|
+
requirement: &70151451239420 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :runtime
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *70151451239420
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: cutest
|
38
|
-
requirement: &
|
49
|
+
requirement: &70151451238800 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70151451238800
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
59
|
name: capybara
|
49
|
-
requirement: &
|
60
|
+
requirement: &70151451238080 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,10 +65,10 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :development
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *70151451238080
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: fakeweb
|
60
|
-
requirement: &
|
71
|
+
requirement: &70151451237360 !ruby/object:Gem::Requirement
|
61
72
|
none: false
|
62
73
|
requirements:
|
63
74
|
- - ! '>='
|
@@ -65,10 +76,10 @@ dependencies:
|
|
65
76
|
version: '0'
|
66
77
|
type: :development
|
67
78
|
prerelease: false
|
68
|
-
version_requirements: *
|
79
|
+
version_requirements: *70151451237360
|
69
80
|
- !ruby/object:Gem::Dependency
|
70
81
|
name: vcr
|
71
|
-
requirement: &
|
82
|
+
requirement: &70151451236640 !ruby/object:Gem::Requirement
|
72
83
|
none: false
|
73
84
|
requirements:
|
74
85
|
- - ! '>='
|
@@ -76,7 +87,7 @@ dependencies:
|
|
76
87
|
version: '0'
|
77
88
|
type: :development
|
78
89
|
prerelease: false
|
79
|
-
version_requirements: *
|
90
|
+
version_requirements: *70151451236640
|
80
91
|
description: Send image/video to an airplay enabled device
|
81
92
|
email:
|
82
93
|
- yo@brunoaguirre.com
|
@@ -90,6 +101,9 @@ files:
|
|
90
101
|
- README.md
|
91
102
|
- Rakefile
|
92
103
|
- airplay.gemspec
|
104
|
+
- examples/jobs.jpg
|
105
|
+
- examples/send_image.rb
|
106
|
+
- examples/send_video.rb
|
93
107
|
- lib/airplay.rb
|
94
108
|
- lib/airplay/client.rb
|
95
109
|
- lib/airplay/protocol.rb
|