XPSL Docs: Motivation and Overview
Table of Contents
Motivation #
Walking on the street, listening to a song you like, sharing that song with your friends, do a bit of silent dancing on the street, groove a little bit. Maybe you like that song your friend suggests, and wants to add it into your own music library.
Except you are on Apple Music and your mate is on Spotify. There are no services out there that offers a unified listening experience across multiple music providers.
XPSL aims to solve this.
How XPSL will work #
X - Cross
P - Platform
S - Social
L - Listening
XPSL works as a middleman between Spotify and/or Apple Music. To use XPSL, a user must either use Spotify or Apple Music, henceforth referred to as SAM.
Once authenticated, they will have the option to either join a room or create a new room. A user can only belong to one room at a time. In each room, there are multiple users. They have a shared playlist that they can add and remove songs using ISRCs. ISRC stands for International Standard Recording Code. It is an international identifier for sound recordings and music video recordings. Both Apple Music and Spotify supports retrieval of and searching for ISRCs.
Each song in the playlist contains direct links or identifiers from Spotify or Apple Music. This is dependent on what music providers are present in the room (based on users’ subscriptions).
In each room, all users will be listening to the same song at the same time. This exact time
can vary. Control events such as scrub, play, pause, next, previous, stop are shared using a low-latency transport like WebSocket or NATS.io.
The implementation of rooms can be simplified by using NATS.io. Each room can be a topic that a group of users subscribes to. Control of switching rooms and validating how many rooms a user is subscribed to can also be simplified and delegated to the Player Controller.
Additionally, events such as user joining, leaving a room are tracked and broadcast to other users in the same room.