• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Play Streaming mp3 File  RSS feed

 
Greenhorn
Posts: 10
Java Java ME MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to play mp3 file from remote server. Can anyone help me ?
 
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!