Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:53:24+00:00 2026-06-01T14:53:24+00:00

I am currently coding some chat program and now want to play music via

  • 0

I am currently coding some chat program and now want to play music via a client command like:

/music http://somewebsite.com/somesong.mp3

So the link would be sent from the client that sent the song, to the server. The server should then without downloading the song, stream it to every client (they shouldn’t download it as well). Problem is, I don’t know how to stream mp3’s over a TCP based connection.

My question is, if someone could provide me with libraries/tutorials/ideas/code examples of what I need.

As an alternative directly streaming music from one client’s computer would be okay as well. If I (as a client) play a song on my machine (using some music player like VLC or similar) and then type a certain command (maybe /stream), the sounds from my soundcard would be streamed to the server and then to every client logged in.

It would be awesome if you could provide me with some advice for both, Google didn’t really help so far, mainly because I don’t quite understand what I should search for.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:53:26+00:00Added an answer on June 1, 2026 at 2:53 pm

    I found a library that does exactly what I want to do:
    http://www.javazoom.net/javalayer/javalayer.html

    public void play() {
            String song = "http://www.ntonyx.com/mp3files/Morning_Flower.mp3";
            Player mp3player = null;
            BufferedInputStream in = null;
            try {
              in = new BufferedInputStream(new URL(song).openStream());
              mp3player = new Player(in);
              mp3player.play();
            } catch (MalformedURLException ex) {
            } catch (IOException e) {
            } catch (JavaLayerException e) {
            } catch (NullPointerException ex) {
            }
    
    }
    

    Hope that helps everyone with a similar question 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm trying to create some coding short cuts for our website. Right now
We are currently going through the long process of writing some coding standards for
I am currently coding a website for a band and i have a music
I'm currently coding an app that has hotkey functionality, I've done some reading and
I have some trouble coding a themes shortcode. I want the code to display
Without resorting to using an ActiveX or some other kind of client side coding:
I'm currently developing a Java-based library for network coding (http://en.wikipedia.org/wiki/Network_coding). This is very CPU-intensive
I am currently coding a simple Data Access Layer, and I was wondering which
I am quite new to Java and am currently coding an Android application. In
Currently my workflow with Emacs when I am coding in C or C++ involves

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.