W
W
WhatIsHTML2018-04-18 15:31:35
Angular
WhatIsHTML, 2018-04-18 15:31:35

Implementation of an audio player, stream, where to start?

I'm interested in the general concept of how modern players work, for example, on the radio.
A few thoughts and questions related to them:
0. If there are ready-made solutions for Angular 2/4/5 + NodeJS, then I will be glad to see links.
1. The user turns on the radio and, as it were, is included in the stream, i.e. receives the song already in the process of playing.
How it's done?
2. Traffic is loaded gradually as you listen. To start listening to a song, you do not need to receive the entire file. Thus, the music starts faster and the traffic will not gobble up 10Mb if you listened to a couple of seconds.
How it's done?
3. How is the stream sent to the client? In any form? What I was able to implement now is the transfer in raw format, but it is not clear how to reproduce it on the client - this is the first time, and secondly, somehow it needs to be broken into parts and loaded gradually.
4. To listen to music on the radio, it is not necessary to be registered, anyone can log in and turn on the stream. Maybe I'm confusing cold with green, but isn't this a vulnerability to Ddos attacks? Or the number of listeners online does not affect the load on the server?
5. How to protect yourself as much as possible from downloading files from the server during the stream?
PS
6. How suitable will NodeJs be for such tasks?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-04-18
@Stalker_RED

You seem to have not tried to google at all, and really confuse cold with green.
To begin with, it would be nice to read what streaming is in general. Most of the questions will disappear.
Here is an example of a player: https://jsfiddle.net/wjckm0xk/ ( documentation )
Plays streams, and not only
Here are the servers for you: https://www.google.com/search?q=audio+streaming+server
and in the form services, and boxed products, and source codes.
1. RTFM
2. RTFM
3. RTFM
4. Affects
5. There are no files anyway, streaming. And the stream itself cannot be protected in any way. You can, of course, encrypt traffic and make your own player with decryption, but who will stop you from robbing the sound from the audio output?
6. NodeJs for writing webfaces, or why? I don't see the point of writing my own streaming server. It is quite difficult, despite the fact that there is a wide selection of ready-made ones.

C
Che_Bu_Rashka, 2018-04-18
@Che_Bu_Rashka

MULTICAST watch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question