Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enobufs/webrtc-audio-streaming
Audio streaming from a file using WebRTC
https://github.com/enobufs/webrtc-audio-streaming
Last synced: 10 days ago
JSON representation
Audio streaming from a file using WebRTC
- Host: GitHub
- URL: https://github.com/enobufs/webrtc-audio-streaming
- Owner: enobufs
- Created: 2019-01-02T07:17:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T10:17:14.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T06:01:41.775Z (7 months ago)
- Language: JavaScript
- Size: 10.5 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Audio Streaming with WebRTC
## What does this do?
This demonstrates an audio streaming using WebRTC between the two browsers.
Instead of using microphones, sender side browser reads a MP3 file, then
streams it out to the receiver using WebRTC, while the receiver plays the audio
stream in real-time.```
+-----+ +-----------+
| MP3 | +------->| Signaling |<---------+
+-----+ | |(socket.io)| |
| | +-----------+ |
v v v
+-----------+ +-----------+
| Browser | WebRTC (OPUS/RTP) | Browser |
| +----------------+------->| |--> Speaker ))
| (Sender) | | . | (Receiver)|
+-----------+ | {or} +-----------+
| . +-----------+
| . |pion/webrtc|
+------->| |--> Speaker ))
| (Receiver)|
+-----------+
```## How to run?
Check out the repo, cd into the root folder, then:
```sh
npm install
npm start
```### Browser to browser
HTTP server with signaling service (socket.io) should be running at URL: `http://0.0.0.0:8080`.
Open your browser at the URL, then follow the further instruction.### Browser to pion/webrtc
Open your browser at the URL (same as above), then click "sender tab" page only.cd into `pion` folder, then:
```sh
go build
./pion --use-stun
```