feat: audio track history
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// AudioProgress is one persisted resume point for the floating audio
|
||||
// player — the last-known playback position of a single audio file for a
|
||||
// user. Key is the track URL with query/hash stripped (the stable file
|
||||
// identity, owned by the frontend). Position/Duration mirror the
|
||||
// HTMLAudioElement's currentTime/duration in seconds. UpdatedAt is set by
|
||||
// the client so multi-device writes resolve newest-wins on upsert.
|
||||
type AudioProgress struct {
|
||||
Key string `json:"key"`
|
||||
Position float64 `json:"position"`
|
||||
Duration *float64 `json:"duration,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user