How can I write a script in ruby that plays an mp3 file (background music) when executed from the command line?
I tried this
run = "mplayer #{"/Users/bhushan/resume/m.mp3"} -ao sdl -vo x11 -framedrop -cache 16384 -cache-min 20/100"
system(run)
but it doesn’t work either, above is a specific player. what if the user does not have mplayer installed. Is there a better way?
source
share