Git Product home page Git Product logo

vlc-client's Introduction

vlc-client Build Status

vlc-client manages a VLC media player instance through it's RC interface.

Installation

Add this line to your application's Gemfile:

gem 'vlc-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vlc-client

Usage

Create a client and connect to a running VLC media player instance.
vlc = VLC::Client.new('192.168.1.10', 9999) #Expects a VLC media player running on `192.168.1.10:9999`, e.g. `vlc --extraintf rc --rc-host 192.168.1.10:9999`

vlc.connect # connect to server
# => true

vlc.play('http://example.org/media.mp3') # play media
# => true

vlc.playing?
# => true

vlc.fullscreen
# => true
#...
Create a self managed client/server system.

Most of the time we want a local client/server VLC media player system

vlc = VLC::System.new # A client/server system over a local managed VLC instance

vlc.connected? # auto connect
# => true

vlc.play('http://example.org/media.mp3')
# => true

vlc.progress
# => 1 #%
#...

# Technically this is the same as
vlc = VLC::Client.new(VLC::Server.new('localhost', 9595, false))

Playlist management

vlc = VLC::System.new

vlc.add_to_playlist('track1.mp3')
vlc.add_to_playlist('track2.mp3')

vlc.play

vlc.playlist
#=> [{:number=>1, :title=>"Track #1 title", :length=>"00:03:10", :times_played=>1}, {:number=>2, :title=>"Track #2 title", :length=>"00:03:30", :times_played=>0}]

Reference

reference

Notice

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:

echo "alias vlc='/Applications/VLC.app/Contents/MacOS/VLC'" >> ~/.bash_profile
echo "alias cvlc='/Applications/VLC.app/Contents/MacOS/VLC'" >> ~/.bash_profile

Contributing

  1. Fork it
  2. Create your topic branch (git checkout -b my-topic-branch)
  3. Add/change specs for your unimplemented feature or bug fix
  4. Hack it
  5. Make sure specs pass (bundle exec rake spec)
  6. Edit the documentation so it is coherent with your feature or fix. Run bundle exec rake yard to review
  7. Commit changes (git commit -am 'Add some feature/fix') and push to the branch (git push origin my-topic-branch)
  8. Submit a pull request

Copyright

Copyright (c) 2012 Miguel Guinada LICENSE for details.

vlc-client's People

Contributors

mguinada avatar justjake avatar aesthetikx avatar wallace avatar tommysolsen avatar woodruffw avatar weswigham avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.