Class: LoquendoRuby::Player

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

Overview

This is the class for play downloaded audio

Instance Method Summary collapse

Instance Method Details

#play_mp3(mp3_file) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/utils/player.rb', line 21

def play_mp3(mp3_file)
  validate_os_support

  if windows_os?
    download_with_powershell(mp3_file)
    play_on_windows
  else
    download_mp3(mp3_file)
    play_on_unix
  end

  delete_mp3_file
end