Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

WAV on a web server

by DOSUser101 (Initiate)
on Sep 01, 2012 at 22:08 UTC ( #991200=perlquestion: print w/ replies, xml ) Need Help??
DOSUser101 has asked for the wisdom of the Perl Monks concerning the following question:

I'm pretty new to Perl. I have a small web server running on my home network. I would like to be able to log onto the web server, click a button, and have a wav file play on the web server. I don't know if this is something that is possible but I would like to try. Thanks for any help.

Comment on WAV on a web server
Re: WAV on a web server
by Corion (Pope) on Sep 01, 2012 at 22:34 UTC

    Perl can easily run web servers. For example, CGI provides the most basic functionality. Mojolicious and Dancer for example are more capable frameworks. All of them can run another program that plays the sound on your webserver machine.

    For playing the sound, I would look at mplayer or any other sound player program, and launch that, for example via system.

Re: WAV on a web server
by CountZero (Bishop) on Sep 02, 2012 at 09:21 UTC
    Do you mean you have stored your music files on the server and you want to listen to them on your client machine?

    If so, explore Logitech Media Server (written in Perl!).

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      I have the music file stored on the server and want them to play on the server. Right know I have a perl script that is launching mplayer via system. My only problem is that I can't seem to activate the script server-side via a client. Any help would be greatly appreciated.

        What do you mean by "Can't seem to activate the script"? Does the web server error log have any information? What are the symptoms?
        What good does it do to play the music files on the server? Is there anybody in the server room who can listen to them? If so, (s)he can simply launch the musicplayer via the console.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://991200]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-08-27 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls