1
0
Fork
You've already forked SongWeb
0
No description
  • Rust 100%
Emmett de St. Croix c30f498f81
Add specification to repo
Forgot to actually commit this. Whoops.
2025年04月18日 21:33:34 -07:00
sample_client Handle switching subscribed playlists better 2025年03月24日 17:29:41 -07:00
songweb Update readme 2025年04月18日 21:33:10 -07:00
.gitignore Cleanup Server/SwarmController, hosting state messages 2025年03月23日 18:56:35 -07:00
Cargo.lock More code cleanup, improve errors, remove tokio dependecy from songweb 2025年03月24日 17:12:55 -07:00
Cargo.toml Improve the example client interface 2025年03月22日 06:13:37 -07:00
COPYING Initial commit 2025年02月24日 16:57:13 -08:00
README.md Update readme 2025年04月18日 21:33:10 -07:00
specification.md Add specification to repo 2025年04月18日 21:33:34 -07:00

SongWeb

SongWeb is a prototype, proof-of-concept p2p protocol to allow peers to share music over a local network through shared, network-accessible playlists. It is built on top of the libp2p networking stack.

This repository consists of two parts: the reference library for the protocol in the songweb directory, and an example client in the sample_client directory.

Using The Example Client

To use the example client, it is required to have gstreamer installed, as well as all of gstreamer-plugins-good gstreamer-plugins-bad, and potentially gstreamer-plugins-ugly. gstreamer-rtsp-server must also be installed in order for streaming to work.

To run the client, clone the repository and in the top-level directory run the command

cargo run --bin sample-client -- -m path/to/some/music

with path/to/some/music replaced with a path to a directory containing music files. To demonstrate streaming capabilities, run another instance of the application with directory containing music not present in the directory for the first instance.

One important caveat is that there is a bug that I was not able to track down, leading me to believe that it could be a bug in libp2p itself, which causes peers to fail to connect to each other correctly. If, when subscribing to a remote playlist, a status message indicating that the action failed is shown, it is necessary to restart at least the instance of the application which posted the error. This bug is very annoying and many attempts to find the cause have sadly failed.

To use the application, navigation between and within panes can be done with the arrow keys, and enter to select or activate the selected item. In the library pane, enter will add the selected song to the local playlist, while alt+enter will add it to the subscribed playlist, if there is one subscribed. (Shift+enter is not picked up by the terminal backend for some reason)

In order to send song requests to another peer on the network, it is first necessary to subscribe to the peers playlist by selecting it in the "available playlists" pane.

Pressing space starts playing the local playlist, or pauses it if currently playing. Due to unfortunate time constraints any other form of playback control are not implemented at this time.