Skip to content

Listen to podcasts or songs together – whether you are miles apart or sitting next to each other. ListenTogether is a progressive web app (PWA) for synchronized audio playback between multiple peers using WebRTC. This is a read-only mirror of the main repository at https://gitlab.com/listentogether

License

Notifications You must be signed in to change notification settings

jofr/listentogether-app

Repository files navigation

ListenTogether

Example video showcasing how the app works

What is this?

ListenTogether is a progressive web app which can be used to listen to podcasts or other audio files together – whether you are miles apart or sitting next to each other. Read more about what it does, how it works and how it handles your data below or try it out right now in your browser.

Your playlist and listening state will be synchronized with everyone who is joining your listening. Just invite people by sharing the invitation link with them. Because ListenTogether is a progressive web app they do not need to have anything installed. They can just open the link in their browser and it works (as long as they have an internet connection and the browser supports WebRTC which is used for the communication to synchronize playback).

For now only the person that initiated a listening session (the host) can add audio files and control playback. For future versions it is planned to include an option to also allow the connected listeners to modify the playlist or change playback.

Why is there a need for this?

Some people like to listen to audio, podcasts or music together – that is why there are headphone splitters. But you don't always have one of those with you. And even if you do: this solution does not work if one of you has bluetooth headphones, it does not work if you are more than two people and it does only work if you are sitting next to each other.

ListenTogether works wether you are sitting next to each other on the train or are on different continents. It works wether you are two, three or five people. You just need a device with a web browser and an active internet connection.

What type of audio can it be used for?

Theoretically it can be used for every audio file which can be played by your browser and which is publicly accessible via HTTP or HTTPS (because every listener needs access to the audio file – for now only the playback state is synchronized between clients and not the actual audio file itself). Practically this means that it is mostly useful for podcasts right now because those are the audio files which typically satisfy these requirements.

For podcasts you don't even need to know the URL of the audio file because you can search for podcasts and add podcast episodes directly inside the app. But of course it does not only work for podcasts. As long as you have an URL of the audio file you can play it and synchronize playback. Just paste the URL into the input field when adding an audio to the playlist.

How does it work, how is my data transmitted and handled?

ListenTogether works by establishing a peer-to-peer connection between the host and all the listeners using WebRTC. This communication is always end-to-end encrypted and ideally (once established) directly between the peers with no middleman involved. If no direct communication is possible the connection is relayed through a TURN server (which now knows about the connection but cannot access, modify or read any of the transmitted information because of the end-to-end encryption). The information transmitted between host and peers includes the playlist (a list of URLs of the audio files), playback state and metadata information about the audio files (title, artists, URLs of cover pictures, etc.).

Each listening session is identified by an ID (which is a string of alphanumerical letters randomly generated by the host). If you start a listening session using the app everybody who knows that ID can now connect to you in the way specified above and transfer the data specified above with you.

For direct communication between unfamiliar parties using WebRTC a signalling server is needed to exchange the metadata needed to establish the direct connection. This signaling server needs to store your IP address, signaling data and ID for as long as you are connected to the signaling server.

If you use the podcast search functionality the search string is transmitted to a server which uses the Podcast Index to provide a list of resulting podcasts and episodes but does not log any of the requests.

Summary of the ways your data is handled and transmitted

  • Between host and listeners using WebRTC: Host and listeners exchange information about URLs of audio files in the playlist, playback state and metadata about audio files (title, artist, cover picture, etc.). Everybody who knows the ID of your current listening session can connect to this listening session. The ID of the listening session can be shared using the Invite function of the app.

  • Signaling server: The provided signaling server is needed to establish the WebRTC connection and stores your IP address, your ID and necessary signaling data for as long as you are connected (but does not save or log any of this information permanently).

  • TURN server: The provided TURN server is used as a fallback to relay the communication between peers if a direct connection is not possible. It has to store the information necessary for relaying the traffic between peers (e.g. IP addresses) for as long as this connection is active (but does not save or log any of this information permanently).

  • Podcast search: The provided podcast search server might relay the search query to the Podcast Index (if it has no cached response to the query) but never transmits any other information to the Podcast Index and does not save or log any personally identifiable information permanently.

About

Listen to podcasts or songs together – whether you are miles apart or sitting next to each other. ListenTogether is a progressive web app (PWA) for synchronized audio playback between multiple peers using WebRTC. This is a read-only mirror of the main repository at https://gitlab.com/listentogether

Topics

Resources

License

Stars

Watchers

Forks