Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Tahir Akram
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!