mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-13 21:48:30 +08:00
add web output backend
This commit is contained in:
33
plugin/webinfo/info.go
Normal file
33
plugin/webinfo/info.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package webinfo
|
||||
|
||||
import "AynaLivePlayer/player"
|
||||
|
||||
type MediaInfo struct {
|
||||
Index int
|
||||
Title string
|
||||
Artist string
|
||||
Album string
|
||||
Username string
|
||||
Cover player.Picture
|
||||
}
|
||||
|
||||
type OutInfo struct {
|
||||
Current MediaInfo
|
||||
CurrentTime int
|
||||
TotalTime int
|
||||
Lyric string
|
||||
Playlist []MediaInfo
|
||||
}
|
||||
|
||||
const (
|
||||
OutInfoC = "Current"
|
||||
OutInfoCT = "CurrentTime"
|
||||
OutInfoTT = "TotalTime"
|
||||
OutInfoL = "Lyric"
|
||||
OutInfoPL = "Playlist"
|
||||
)
|
||||
|
||||
type WebsocketData struct {
|
||||
Update string
|
||||
Data OutInfo
|
||||
}
|
||||
Reference in New Issue
Block a user