• 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 Streaming mp3 File

 
Greenhorn
Posts: 10
Java ME MySQL Database Java
  • 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 mp3 file from remote server. Can anyone help me ?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JLayer allows you to create a Player (or AdvancedPlayer) from an InputStream. That should work. Other MP3 playing libraries may have similar optionality.
However, keep in mind that if the connection is slow, the player will either have to pause regularly or perhaps even throw an exception. Perhaps you'd like to add some form of buffering in yourself if you encounter any problems.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaFX 2.0 also supports MP3 playback.
http://docs.oracle.com/javafx/2.0/media/overview.htm#sthref4

edit: and the next page http://docs.oracle.com/javafx/2.0/media/simpleplayer.htm
 
reply
    Bookmark Topic Watch Topic
  • New Topic