• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic