Class: VieraPlay::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/viera_play/player.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Player

Returns a new instance of Player.



3
4
5
6
7
# File 'lib/viera_play/player.rb', line 3

def initialize(opts)
  @tv = TV.new(opts.fetch(:tv_control_url))
  @file_path = opts.fetch(:file_path)
  @server = SingleFileServer.new(file_path, opts.fetch(:additional_mime_types, {}))
end

Instance Method Details

#callObject



9
10
11
12
# File 'lib/viera_play/player.rb', line 9

def call
  trap_interrupt
  play_and_wait
end