Module player Copy item path Source music_player_client Generated client implementations. music_player_server Generated server implementations. playlist_add_track Nested message and enum types in PlaylistAddTrack. playlist_helpers playlist_tracks_to_remove Nested message and enum types in PlaylistTracksToRemove. stream_updates Nested message and enum types in StreamUpdates. track_id Nested message and enum types in TrackId. update_playlist Nested message and enum types in UpdatePlaylist. update_track_changed Nested message and enum types in UpdateTrackChanged. Duration using a custom Duration that matches rust’s definition, as rust’s may not fit
into google’s well-known Duration Empty GaplessState A Gapless state. GetProgressResponse PlayState A play status. PlayerProgress Struct to keep both values with a name, as tuples cannot have named fields PlayerTime PlaylistAddTrack A Track got added to the playlist, this message contains where it was added and all the metadata required for display. PlaylistAddTrackInfo PlaylistCleared The Playlist got completely cleared PlaylistLoopMode The current Loop mode for the playlist PlaylistLoopModeInfo PlaylistPlaySpecific Play a specific track in the playlist PlaylistRemoveTrack A Track got removed from the playlist. PlaylistRemoveTrackInfo PlaylistShuffled / Indicate that the playlist has been shuffled and should be re-fetched PlaylistShuffledInfo PlaylistSwapInfo PlaylistSwapTracks Some track needs to be swapped. PlaylistTracks All tracks in the current playlist, they should be ordered from lowest to highest index. PlaylistTracksToAdd Add multiple tracks to a Playlist PlaylistTracksToRemove Remove multiple track or clear the playlist PlaylistTracksToRemoveClear / Clear the entire playlist PlaylistTracksToRemoveIndexed Remove multiple tracks from a playlist SpeedReply StreamUpdates all updates that can happen from the server side, without the client to have to ask explicitly
naming convention for the stream update specific messages is to add the “Update” prefix, even if a similar non-prefix message already exists TrackChangedInfo TrackId A Identifier for a track. UpdateGaplessChanged The Gapless state changed, send new information. UpdateMissedEvents Indicate that some events could not be send
Like a “Lagged” Error from tokio-stream UpdatePlayStateChanged TODO: is play-state (playing / paused / ??) the only things this should do? UpdatePlaylist UpdateProgress There is a progress update to the currently playing track, may not be fired if paused or stopped UpdateSpeedChanged The Speed changed, send new information UpdateTrackChanged The track changed in some way, send new information
This includes everything from changing to a new track, new radio title, etc
This is not used for regular track progress updates
NOTE: this may or may not be sent for the initial track after startup as the client may connect after the track started UpdateVolumeChanged The Volume changed, send new information VolumeReply RunningStatus UpdateEvents UpdatePlaylistEvents Separate nested enum to handle all playlist related events clamp_u16 Clamp a given u32 to be u16. PlayerTimeUnit The primitive in which time (current position / total duration) will be stored as