Music
Music API endpoints
📄️ Validate Music Rule Name
Checks whether a given music rule name is already in use (case-insensitive) by reading the persisted music_config document directly from the database.
📄️ Get Music Config
Fetches current global music configuration (enabled state, files, and rules) via ROS service call.
📄️ Save Music Config
save and update music configuration. music_enabled is preserved by the server and not changed by this endpoint.
📄️ Upload Music File
Uploads an audio file via multipart form. The server converts the binary to uint8[] before forwarding to the ROS upload_music service.
📄️ Delete Music File
Deletes an uploaded music file by ID via ROS service call. Fails if any active (non-stop) rule still references the file.
📄️ Get All Music Files Metadata
Returns metadata for all uploaded music files stored in MongoDB GridFS, including filename, duration, format, size, uploadDate, and any associated playback rules.
📄️ Set Music Enabled
Globally enables or disables music playback via ROS service call. Disabling stops all currently playing music; enabling re-evaluates active rule state.
📄️ Get Music File
Returns the complete audio file bytes for a given GridFS ObjectId. The full file is returned in one response so the client can decode and render the waveform.
📄️ Play Or Stop Music On Robot
Starts or stops playback of the given music file on the robot via ROS service call, independent of any configured rules. `play: true` starts playback, `play: false` stops it.