add web output backend

This commit is contained in:
Aynakeya
2022-07-12 21:06:55 -07:00
parent 6e4c78daf2
commit 94615265bf
16 changed files with 554 additions and 54 deletions

33
plugin/webinfo/info.go Normal file
View 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
}