Forums Register Login

How to play .wav file from URL in web browser embed

+Pie Number of slices to send: Send
Hi;

I want to play a .wav sound file in embed default media player in IE. Sound file is on some HTTP location. I am unable to sound it in that player.

Following is the code.





Here is embed code of HTML.



1. If I write in FileOutputStream then it plays well
2. If I replace my code of getting file from URL to my local hard disk. then it also works fine.

I don't know why I am unable to play file from HTTP. And why it plays well from local hard disk.

Please help.
+Pie Number of slices to send: Send
Is that Java code in a JSP? (an assumption made because you posted this in the JSP forum)

If so, move it to a servlet. Foremost, Java code has no place in a JSP. Secondly, JSP is made for rendering text response, not binary data. The JSP may be adding extraneous characters that are screwing up your data stream. Please read this article for more information
I'm gonna teach you a lesson! Start by looking at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3093 times.
Similar Threads
Swing/dynamically
Swing/path specification
Swing/Sounds/panels
Play a .wav file
Swing/Panels
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:24:19.