vlc-client 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile +5 -4
- data/README.md +3 -3
- data/lib/vlc-client/client/media_controls.rb +5 -0
- data/lib/vlc-client/server.rb +7 -0
- data/lib/vlc-client/version.rb +1 -1
- data/spec/vlc-client/client/media_controls_spec.rb +14 -0
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bf06f6577ac01caa2f087f52810c0f9f8f9d909
|
4
|
+
data.tar.gz: 28223c029ee4a5df6eaa988f724766e9fcaae4e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5103d85a95e92e33f8a7a07b42f4882517888dd38e49217cb8d3cabdc70171b7e848f480dde1443a99543bd2e20de2419a451d2baee2077cdda442252bfabbb3
|
7
|
+
data.tar.gz: 1f4271b37a1a6e2058e98edf66747d9f10c0558867cf7bd47ba52a1ea558d79dbddf0b5a81df5a06824ba39cf648fec65304e9aeceef8f30b8a954060deb9475
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -10,10 +10,11 @@ group :development do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
group :test do
|
13
|
-
gem 'mime-types',
|
14
|
-
gem 'rspec',
|
15
|
-
gem 'simplecov', :require => false
|
16
|
-
gem 'coveralls', :require => false
|
13
|
+
gem 'mime-types', '< 2.0.0'
|
14
|
+
gem 'rspec', '~> 2.14.1', :require => false
|
15
|
+
gem 'simplecov', '~> 0.8.2', :require => false
|
16
|
+
gem 'coveralls', '~> 0.7.0', :require => false
|
17
|
+
gem 'rest-client', '~> 1.6.7', :require => false
|
17
18
|
end
|
18
19
|
|
19
20
|
gemspec
|
data/README.md
CHANGED
@@ -90,11 +90,11 @@ vlc.connect
|
|
90
90
|
|
91
91
|
## Notice
|
92
92
|
|
93
|
-
vlc-client has been tested on linux but it should work on any VLC installation as long as the command line is responsive for `vlc` and `cvlc` calls. On Mac
|
93
|
+
vlc-client has been tested on linux but it should work on any VLC installation as long as the command line is responsive for `vlc` and `cvlc` calls. On Mac OS X these are not available by default. They can be created with:
|
94
94
|
|
95
95
|
```
|
96
|
-
|
97
|
-
|
96
|
+
echo "alias vlc='/Applications/VLC.app/Contents/MacOS/VLC'" >> ~/.bash_profile
|
97
|
+
echo "alias cvlc='/Applications/VLC.app/Contents/MacOS/VLC'" >> ~/.bash_profile
|
98
98
|
```
|
99
99
|
|
100
100
|
VLC media player 2.0.3 seems to [ship with a bug](http://www.linuxquestions.org/questions/slackware-14/problem-vlc-2-0-3-playing-youtube-videos-4175429135) that invalidates YouTube streaming.
|
data/lib/vlc-client/server.rb
CHANGED
@@ -98,6 +98,13 @@ module VLC
|
|
98
98
|
:in => 'NUL',
|
99
99
|
:out => 'NUL',
|
100
100
|
:err => 'NUL')
|
101
|
+
elsif (/darwin/ =~ RUBY_PLATFORM) != nil
|
102
|
+
Process.spawn('/Applications/VLC.app/Contents/MacOS/VLC',
|
103
|
+
'--extraintf', 'rc', '--rc-host', "#{@host}:#{@port}",
|
104
|
+
:pgroup => detached,
|
105
|
+
:in => '/dev/null',
|
106
|
+
:out => '/dev/null',
|
107
|
+
:err => '/dev/null')
|
101
108
|
else
|
102
109
|
Process.spawn(headless? ? 'cvlc' : 'vlc',
|
103
110
|
'--extraintf', 'rc', '--rc-host', "#{@host}:#{@port}",
|
data/lib/vlc-client/version.rb
CHANGED
@@ -99,6 +99,20 @@ describe VLC::Client::MediaControls do
|
|
99
99
|
vlc.should be_playing
|
100
100
|
end
|
101
101
|
|
102
|
+
it 'may seek' do
|
103
|
+
tcp = tcp_mock
|
104
|
+
|
105
|
+
tcp.should_receive(:puts).once.with('seek 120')
|
106
|
+
tcp.should_receive(:puts).once.with('get_time')
|
107
|
+
tcp.should_receive(:gets).once.and_return('120')
|
108
|
+
|
109
|
+
vlc.connect
|
110
|
+
vlc.play('http://example.org/media.mp3')
|
111
|
+
|
112
|
+
vlc.seek(60 * 2)
|
113
|
+
vlc.time.should eq(120)
|
114
|
+
end
|
115
|
+
|
102
116
|
it 'displays the playing media title' do
|
103
117
|
tcp = tcp_mock
|
104
118
|
tcp.should_receive(:puts).once.with('get_title')
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vlc-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Guinada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: retryable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
description: vlc-client allows to control VLC media player over TCP
|
@@ -31,10 +31,10 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- .gitignore
|
35
|
-
- .rspec
|
36
|
-
- .travis.yml
|
37
|
-
- .yardopts
|
34
|
+
- ".gitignore"
|
35
|
+
- ".rspec"
|
36
|
+
- ".travis.yml"
|
37
|
+
- ".yardopts"
|
38
38
|
- Gemfile
|
39
39
|
- LICENSE
|
40
40
|
- README.md
|
@@ -70,17 +70,17 @@ require_paths:
|
|
70
70
|
- lib
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.2.2
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: vlc-client is a TCP client for VLC media player
|