Play an audio file locally on server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twister594
    New Member
    • Jul 2007
    • 1

    Play an audio file locally on server

    Hi, I'd like to be able to click a button on a web interface, and have an audio file play locally on the server.

    I'm using Apache 2.2 in Ubuntu 7.04.

    I've tried simply using shell_exec and mplayer, but I cannot use su or sudo to play the file as the user logged into the desktop and the apache user does not appear to have access to the soundcard.

    The apparent problem from the command's output for just running mplayer appears to be the line: Terminal type `unknown' is not defined. from mplayer's output.

    Everything else appears as when I run the command in terminal, except the output of the actually playing the file that constantly updates.

    Thanks.
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    A good way to do what you're after is by using Flash.

    Comment

    Working...