airplayer 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -1
- data/Gemfile.lock +63 -32
- data/README.md +6 -4
- data/airplayer.gemspec +6 -5
- data/lib/airplayer/media.rb +6 -5
- data/lib/airplayer/version.rb +1 -1
- data/spec/airplayer/app_spec.rb +11 -0
- data/spec/airplayer/logger_spec.rb +15 -0
- data/spec/airplayer/media_spec.rb +55 -0
- data/spec/airplayer/playlist_spec.rb +41 -0
- data/spec/spec_helper.rb +3 -3
- metadata +26 -6
- data/spec/airplayer_spec.rb +0 -75
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bf034c4f9676f92eb321ceb9dd2cddeb1738fb0
|
4
|
+
data.tar.gz: 798347f078900bec063af19462f77f62d824097e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3c2abc153a8cd5154071df25d8d2c8a28345ffe7401c2f6531e3e0d123884dc90c36c5dacd72399c4853ee4d33e2cd8de5a124b47b3fceddfac277584ff3e9
|
7
|
+
data.tar.gz: 7e734aa5e86af89e9a80b42f4bd35c4c11172e4f20d4a363a79571ca3469f6e250bf9468e70c0b9475791cd6905cdb1cc5d2c266d36720c044efb7aa4e987feb
|
data/.travis.yml
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.9.3
|
4
|
+
- 2.0.0
|
2
5
|
before_install:
|
3
6
|
- 'sudo apt-get -qq update'
|
4
|
-
- 'sudo apt-get -qq install rdnssd libavahi-compat-libdnssd-dev'
|
7
|
+
- 'sudo apt-get -qq install youtube-dl rdnssd libavahi-compat-libdnssd-dev'
|
5
8
|
script: bundle exec rake spec
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
airplayer (0.0.
|
4
|
+
airplayer (0.0.8)
|
5
5
|
airplay (~> 0.2.9)
|
6
6
|
mime-types
|
7
7
|
nokogiri
|
@@ -16,41 +16,71 @@ GEM
|
|
16
16
|
dnssd (~> 2.0)
|
17
17
|
net-http-digest_auth (~> 1.2)
|
18
18
|
net-http-persistent (>= 2.6)
|
19
|
-
|
20
|
-
|
19
|
+
celluloid (0.15.1)
|
20
|
+
timers (~> 1.1.0)
|
21
|
+
coderay (1.0.9)
|
22
|
+
coveralls (0.7.0)
|
23
|
+
multi_json (~> 1.3)
|
24
|
+
rest-client
|
25
|
+
simplecov (>= 0.7)
|
26
|
+
term-ansicolor
|
27
|
+
thor
|
28
|
+
diff-lcs (1.2.4)
|
21
29
|
dnssd (2.0)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
ffi (1.9.0)
|
31
|
+
formatador (0.2.4)
|
32
|
+
guard (2.0.1)
|
33
|
+
formatador (>= 0.2.4)
|
34
|
+
listen (~> 2.0)
|
35
|
+
lumberjack (~> 1.0)
|
36
|
+
pry (>= 0.9.12)
|
37
|
+
thor (>= 0.18.1)
|
38
|
+
guard-rspec (3.1.0)
|
39
|
+
guard (>= 1.8)
|
40
|
+
rspec (~> 2.13)
|
41
|
+
listen (2.0.0)
|
42
|
+
celluloid (>= 0.15.1)
|
43
|
+
rb-fsevent (>= 0.9.3)
|
44
|
+
rb-inotify (>= 0.9)
|
45
|
+
lumberjack (1.0.4)
|
46
|
+
method_source (0.8.2)
|
47
|
+
mime-types (1.25)
|
48
|
+
mini_portile (0.5.1)
|
49
|
+
multi_json (1.8.1)
|
50
|
+
net-http-digest_auth (1.4)
|
51
|
+
net-http-persistent (2.9)
|
52
|
+
nokogiri (1.6.0)
|
53
|
+
mini_portile (~> 0.5.0)
|
54
|
+
pry (0.9.12.2)
|
38
55
|
coderay (~> 1.0.5)
|
39
56
|
method_source (~> 0.8)
|
40
57
|
slop (~> 3.4)
|
41
|
-
rack (1.
|
42
|
-
rake (10.0
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
rspec
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
58
|
+
rack (1.5.2)
|
59
|
+
rake (10.1.0)
|
60
|
+
rb-fsevent (0.9.3)
|
61
|
+
rb-inotify (0.9.2)
|
62
|
+
ffi (>= 0.5.0)
|
63
|
+
rest-client (1.6.7)
|
64
|
+
mime-types (>= 1.16)
|
65
|
+
rspec (2.14.1)
|
66
|
+
rspec-core (~> 2.14.0)
|
67
|
+
rspec-expectations (~> 2.14.0)
|
68
|
+
rspec-mocks (~> 2.14.0)
|
69
|
+
rspec-core (2.14.5)
|
70
|
+
rspec-expectations (2.14.3)
|
71
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
72
|
+
rspec-mocks (2.14.3)
|
73
|
+
ruby-progressbar (1.2.0)
|
74
|
+
simplecov (0.7.1)
|
75
|
+
multi_json (~> 1.0)
|
76
|
+
simplecov-html (~> 0.7.1)
|
77
|
+
simplecov-html (0.7.1)
|
78
|
+
slop (3.4.6)
|
79
|
+
term-ansicolor (1.2.2)
|
80
|
+
tins (~> 0.8)
|
81
|
+
thor (0.18.1)
|
82
|
+
timers (1.1.0)
|
83
|
+
tins (0.11.0)
|
54
84
|
|
55
85
|
PLATFORMS
|
56
86
|
ruby
|
@@ -58,6 +88,7 @@ PLATFORMS
|
|
58
88
|
DEPENDENCIES
|
59
89
|
airplayer!
|
60
90
|
bundler
|
91
|
+
coveralls
|
61
92
|
guard-rspec
|
62
93
|
rake
|
63
94
|
rspec
|
data/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
AirPlayer [![
|
1
|
+
AirPlayer [![Stillmaintained](http://stillmaintained.com/Tomohiro/airplayer.png)](http://stillmaintained.com/Tomohiro/airplayer)
|
2
2
|
================================================================================
|
3
3
|
|
4
4
|
Command-line AirPlay video client for Apple TV
|
5
5
|
|
6
|
-
[![
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/airplayer.png)](http://badge.fury.io/rb/airplayer)
|
7
7
|
[![Dependency Status](https://gemnasium.com/Tomohiro/airplayer.png)](https://gemnasium.com/Tomohiro/airplayer)
|
8
|
+
[![Build Status](https://travis-ci.org/Tomohiro/airplayer.png?branch=master)](https://travis-ci.org/Tomohiro/airplayer)
|
9
|
+
[![Coverage Status](https://coveralls.io/repos/Tomohiro/airplayer/badge.png?branch=master)](https://coveralls.io/r/Tomohiro/airplayer)
|
8
10
|
[![Code Climate](https://codeclimate.com/github/Tomohiro/airplayer.png)](https://codeclimate.com/github/Tomohiro/airplayer)
|
9
11
|
|
10
12
|
|
@@ -17,7 +19,7 @@ Requirements
|
|
17
19
|
- OSX or Ubuntu
|
18
20
|
- Ruby 1.9.3, 2.0.0
|
19
21
|
- AppleTV 2G or later
|
20
|
-
- [youtube-dl](http://rg3.github.com/youtube-dl/)
|
22
|
+
- [youtube-dl](http://rg3.github.com/youtube-dl/) (If you want to watch YouTube)
|
21
23
|
|
22
24
|
|
23
25
|
### Ubuntu
|
@@ -138,7 +140,7 @@ $ airplayer play '~/Movies/Trailers' --shuffle
|
|
138
140
|
|
139
141
|
If you have multiple "AirPlay" devices, specifying the device number for the following play is available on any device.
|
140
142
|
|
141
|
-
|
143
|
+
Check the AirPlay device number
|
142
144
|
|
143
145
|
```sh
|
144
146
|
$ airplayer devices
|
data/airplayer.gemspec
CHANGED
@@ -6,14 +6,14 @@ require 'airplayer/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'airplayer'
|
8
8
|
spec.version = AirPlayer::VERSION
|
9
|
-
spec.authors = ['Tomohiro
|
9
|
+
spec.authors = ['Tomohiro TAIRA']
|
10
10
|
spec.email = ['tomohiro.t@gmail.com']
|
11
|
-
spec.description =
|
12
|
-
spec.summary =
|
11
|
+
spec.description = 'Command-line AirPlay video client for Apple TV'
|
12
|
+
spec.summary = 'Command-line AirPlay video client for Apple TV'
|
13
13
|
spec.homepage = 'https://github.com/Tomohiro/airplayer'
|
14
14
|
|
15
|
-
spec.files = `git ls-files`.split(
|
16
|
-
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
@@ -28,4 +28,5 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency 'rake'
|
29
29
|
spec.add_development_dependency 'rspec'
|
30
30
|
spec.add_development_dependency 'guard-rspec'
|
31
|
+
spec.add_development_dependency 'coveralls'
|
31
32
|
end
|
data/lib/airplayer/media.rb
CHANGED
@@ -21,6 +21,7 @@ module AirPlayer
|
|
21
21
|
|
22
22
|
SUPPORTED_DOMAINS = %w(
|
23
23
|
youtube
|
24
|
+
youtu.be
|
24
25
|
)
|
25
26
|
|
26
27
|
class Media
|
@@ -44,12 +45,12 @@ module AirPlayer
|
|
44
45
|
|
45
46
|
def self.playable?(path)
|
46
47
|
MIME::Types.type_for(path).each do |mimetype|
|
47
|
-
return SUPPORTED_MIME_TYPES.include?
|
48
|
+
return SUPPORTED_MIME_TYPES.include?(mimetype)
|
48
49
|
end
|
49
50
|
|
50
|
-
host = URI.parse(path).host
|
51
|
+
host = URI.parse(URI.escape(path)).host
|
51
52
|
SUPPORTED_DOMAINS.each do |domain|
|
52
|
-
return host =~ /#{domain}/
|
53
|
+
return true if host =~ /#{domain}/
|
53
54
|
end
|
54
55
|
|
55
56
|
false
|
@@ -75,7 +76,7 @@ module AirPlayer
|
|
75
76
|
private
|
76
77
|
def online_media_path(uri)
|
77
78
|
case URI.parse(uri).host
|
78
|
-
when /youtube/
|
79
|
+
when /youtube|youtu\.be/
|
79
80
|
uri = `youtube-dl -g #{uri}`
|
80
81
|
else
|
81
82
|
uri
|
@@ -84,7 +85,7 @@ module AirPlayer
|
|
84
85
|
|
85
86
|
def online_media_title(uri)
|
86
87
|
case URI.parse(uri).host
|
87
|
-
when /youtube/
|
88
|
+
when /youtube|youtu\.be/
|
88
89
|
title = `youtube-dl -e #{uri}`
|
89
90
|
else
|
90
91
|
title = File.basename(uri)
|
data/lib/airplayer/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module AirPlayer
|
4
|
+
describe Logger do
|
5
|
+
subject { AirPlayer::Logger }
|
6
|
+
|
7
|
+
context 'file path' do
|
8
|
+
it '/tmp/airplayer-access.log on Linux' do
|
9
|
+
if RbConfig::CONFIG['target_os'] =~ /linux|unix/
|
10
|
+
expect(subject.path).to eq '/tmp/airplayer-access.log'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
module AirPlayer
|
5
|
+
describe Media do
|
6
|
+
subject { AirPlayer::Media }
|
7
|
+
|
8
|
+
context 'valid mime types' do
|
9
|
+
it 'supported' do
|
10
|
+
expect(subject.playable?('007 SKYFALL.mp4')).to be_true
|
11
|
+
expect(subject.playable?('007 SKYFALL.ts')).to be_true
|
12
|
+
expect(subject.playable?('007 SKYFALL.m4v')).to be_true
|
13
|
+
expect(subject.playable?('007 SKYFALL.mov')).to be_true
|
14
|
+
expect(subject.playable?('007 SKYFALL.ts')).to be_true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'invalid mime types' do
|
19
|
+
it 'unsupported' do
|
20
|
+
expect(subject.playable?('007 SKYFALL.flv')).to be_false
|
21
|
+
expect(subject.playable?('007 SKYFALL.wmv')).to be_false
|
22
|
+
expect(subject.playable?('.DS_Store')).to be_false
|
23
|
+
expect(subject.playable?('Fate_Kaleid_Liner_プリズマ☆イリヤ')).to be_false
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'give Gemfile' do
|
28
|
+
it 'file' do
|
29
|
+
media = subject.new('./Gemfile')
|
30
|
+
expect(media.file?).to be_true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'give URL' do
|
35
|
+
it 'URL' do
|
36
|
+
#media = subject.new('http://example.com/video.mp4')
|
37
|
+
#expect(media.url?).to be_true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'give YouTube URL' do
|
42
|
+
it 'has title and url' do
|
43
|
+
#media = subject.new('http://www.youtube.com/watch?v=gVNYm9Qncyc')
|
44
|
+
#expect(media.url?).to be_true
|
45
|
+
#expect(media.title).to match(/Mogwai/)
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'has title and short url' do
|
49
|
+
#media = subject.new('http://youtu.be/gVNYm9Qncyc')
|
50
|
+
#expect(media.url?).to be_true
|
51
|
+
#expect(media.title).to match(/Mogwai/)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module AirPlayer
|
4
|
+
describe Playlist do
|
5
|
+
subject { AirPlayer::Playlist.new }
|
6
|
+
|
7
|
+
describe '#add' do
|
8
|
+
context 'url' do
|
9
|
+
before { subject.add('http://example.com/video.mp4') }
|
10
|
+
it 'media type is url' do
|
11
|
+
expect(subject.first.path).to match 'http'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'Podcast RSS' do
|
16
|
+
it do
|
17
|
+
subject.add('http://rss.cnn.com/services/podcasting/cnnnewsroom/rss.xml')
|
18
|
+
subject.entries do |media|
|
19
|
+
expect(media).to be_kind_of AirPlayer::Media
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'multiple files' do
|
25
|
+
it 'have multiple files' do
|
26
|
+
expect(subject.add('./video.mp4').size).to eq 1
|
27
|
+
expect(subject.add('./video.m4v').size).to eq 2
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'local file' do
|
32
|
+
it 'type is Media' do
|
33
|
+
subject.add('../airplayer')
|
34
|
+
subject.entries do |media|
|
35
|
+
expect(media).to be_kind_of AirPlayer::Media
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airplayer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Tomohiro
|
7
|
+
- Tomohiro TAIRA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: coveralls
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: Command-line AirPlay video client for Apple TV
|
154
168
|
email:
|
155
169
|
- tomohiro.t@gmail.com
|
@@ -179,7 +193,10 @@ files:
|
|
179
193
|
- lib/airplayer/progress_bar/base.rb
|
180
194
|
- lib/airplayer/server.rb
|
181
195
|
- lib/airplayer/version.rb
|
182
|
-
- spec/
|
196
|
+
- spec/airplayer/app_spec.rb
|
197
|
+
- spec/airplayer/logger_spec.rb
|
198
|
+
- spec/airplayer/media_spec.rb
|
199
|
+
- spec/airplayer/playlist_spec.rb
|
183
200
|
- spec/spec_helper.rb
|
184
201
|
homepage: https://github.com/Tomohiro/airplayer
|
185
202
|
licenses: []
|
@@ -200,10 +217,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
217
|
version: '0'
|
201
218
|
requirements: []
|
202
219
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.0.
|
220
|
+
rubygems_version: 2.0.3
|
204
221
|
signing_key:
|
205
222
|
specification_version: 4
|
206
223
|
summary: Command-line AirPlay video client for Apple TV
|
207
224
|
test_files:
|
208
|
-
- spec/
|
225
|
+
- spec/airplayer/app_spec.rb
|
226
|
+
- spec/airplayer/logger_spec.rb
|
227
|
+
- spec/airplayer/media_spec.rb
|
228
|
+
- spec/airplayer/playlist_spec.rb
|
209
229
|
- spec/spec_helper.rb
|
data/spec/airplayer_spec.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe :AirPlayer do
|
4
|
-
context :App do
|
5
|
-
let(:app) { AirPlayer::App.new }
|
6
|
-
|
7
|
-
it 'class type is Thor' do
|
8
|
-
expect(app).to be_kind_of Thor
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
context :Logger do
|
13
|
-
it 'file path is /tmp/airplayer-access.log on Linux' do
|
14
|
-
if RbConfig::CONFIG['target_os'] =~ /linux|unix/
|
15
|
-
expect(AirPlayer::Logger.path).to eq '/tmp/airplayer-access.log'
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context :Media do
|
21
|
-
it 'check supported mime types' do
|
22
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.mp4')).to be_true
|
23
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.ts')).to be_true
|
24
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.m4v')).to be_true
|
25
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.mov')).to be_true
|
26
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.ts')).to be_true
|
27
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.flv')).to be_false
|
28
|
-
expect(AirPlayer::Media.playable?('007 SKYFALL.wmv')).to be_false
|
29
|
-
expect(AirPlayer::Media.playable?('.DS_Store')).to be_false
|
30
|
-
end
|
31
|
-
|
32
|
-
it 'give to local file' do
|
33
|
-
media = AirPlayer::Media.new('./Gemfile')
|
34
|
-
expect(media.file?).to be_true
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'give to url' do
|
38
|
-
media = AirPlayer::Media.new('http://example.com/video.mp4')
|
39
|
-
expect(media.url?).to be_true
|
40
|
-
end
|
41
|
-
|
42
|
-
it 'give to YouTube url' do
|
43
|
-
media = AirPlayer::Media.new('http://www.youtube.com/watch?v=gVNYm9Qncyc')
|
44
|
-
expect(media.url?).to be_true
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
context :Playlist do
|
49
|
-
let(:playlist) { AirPlayer::Playlist.new }
|
50
|
-
|
51
|
-
it 'add URL to list, and that media type is url' do
|
52
|
-
playlist.add('http://example.com/video.mp4')
|
53
|
-
expect(playlist.first.path).to match 'http'
|
54
|
-
end
|
55
|
-
|
56
|
-
it 'add Podcast rss to list' do
|
57
|
-
playlist.add('http://rss.cnn.com/services/podcasting/cnnnewsroom/rss.xml')
|
58
|
-
playlist.entries do |media|
|
59
|
-
expect(media).to be_kind_of AirPlayer::Media
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
it 'add file to list, and that media type is file' do
|
64
|
-
expect(playlist.add('./video.mp4').size).to eq 1
|
65
|
-
expect(playlist.add('./video.m4v').size).to eq 2
|
66
|
-
end
|
67
|
-
|
68
|
-
it 'has list contains url or file path' do
|
69
|
-
playlist.add('../airplayer')
|
70
|
-
playlist.entries do |media|
|
71
|
-
expect(media).to be_kind_of AirPlayer::Media
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|