Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   ASP.NET (http://www.programmingforums.org/forum35.html)
-   -   Playing Sound Client-Side (http://www.programmingforums.org/showthread.php?t=13475)

King Jul 4th, 2007 8:10 PM

Playing Sound Client-Side
 
I am trying to play media files client-side on my ASP.Net website. I am using C# for the pages, so in my aspx.cs file, on certain button click event handlers I want to play music. So included the Windows Media Player dll and it worked to play music:
:

WindowsMediaPlayer wmp = new WindowsMediaPlayer();
wmp.URL = soundFile;
wmp.controls.play();

When I tested this page running everything locally everything seemed to be working buetifly. But once I moved the pages to a server and viewed them on another machine, the sound was playing on the server, not the client browser (as you might have guessed). So is there an easy way I can just tell this to play on the client? If not, can anyone give me some direction to script it in the client and still get things to play on the events I want it to?

Thanks in advance.

King Jul 6th, 2007 12:25 AM

No one knows how to play media files client-side?

lectricpharaoh Jul 6th, 2007 3:05 AM

The reason they play on the server is because, uhm, that's where the code's running. To play them client-side, you'd need to use something like Javascript or VBscript, assuming those even have such functionality. Barring that, you'd need to embed a multimedia object in the HTML output, or use a technology that's designed for interactive multimedia over HTTP, like Flash.

xavier Jul 6th, 2007 12:47 PM

You could just use this: http://www.xspf.org/quickstart/ and http://musicplayer.sourceforge.net/
I really liked the idea.


All times are GMT -5. The time now is 2:49 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC