nicmr / fidelitas

Rust network audio player and web client using actix and crossbeam multithreading, websockets, libvlc, and an Elm frontend.
GNU General Public License v3.0
0 stars 0 forks source link

Idempotent pause signal #25

Open nicmr opened 4 years ago

nicmr commented 4 years ago

Currently the pause signal is handled as a toggle signal on the server. Receiving pause when the player is already paused will unpause the track.

Why is it terrible? It will result in two clients attempting to pause a track revert the other parties command despite trying to achieve the same result.

What should happen instead? Additional pause signals with an already paused player state will not change Instead, clients can choose to instead send a play signal if the current state is paused and the user selects a pause button again.