mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-12 05:08:12 +08:00
* rewrite * update submodule * make width height configurable * update dependency * update * update file * update dep * fix basic config layout * update plugin management * more stuff * add blacklist * fix todo * fix windows gethandle * update windows update guide * update windows build guide * include go mod tidy in script * update todo * fix source session * fix text output * add plugin play duration control * fix id diange not working * update todo * update version number
47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
package events
|
|
|
|
import "AynaLivePlayer/core/model"
|
|
|
|
const PlayerPlayingUpdate = "update.player.playing"
|
|
|
|
type PlayerPlayingUpdateEvent struct {
|
|
Media model.Media
|
|
Removed bool // if no media is playing, removed is true
|
|
}
|
|
|
|
const PlayerPropertyPauseUpdate = "update.player.property.pause"
|
|
|
|
type PlayerPropertyPauseUpdateEvent struct {
|
|
Paused bool
|
|
}
|
|
|
|
const PlayerPropertyPercentPosUpdate = "update.player.property.percent_pos"
|
|
|
|
type PlayerPropertyPercentPosUpdateEvent struct {
|
|
PercentPos float64
|
|
}
|
|
|
|
const PlayerPropertyIdleActiveUpdate = "update.player.property.idle_active"
|
|
|
|
type PlayerPropertyIdleActiveUpdateEvent struct {
|
|
IsIdle bool
|
|
}
|
|
|
|
const PlayerPropertyTimePosUpdate = "update.player.property.time_pos"
|
|
|
|
type PlayerPropertyTimePosUpdateEvent struct {
|
|
TimePos float64 // Time in seconds
|
|
}
|
|
|
|
const PlayerPropertyDurationUpdate = "update.player.property.duration"
|
|
|
|
type PlayerPropertyDurationUpdateEvent struct {
|
|
Duration float64 // Duration in seconds
|
|
}
|
|
|
|
const PlayerPropertyVolumeUpdate = "update.player.property.volume"
|
|
|
|
type PlayerPropertyVolumeUpdateEvent struct {
|
|
Volume float64 // Volume from 0-100
|
|
}
|