mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-11 20:58:13 +08:00
rewrite
This commit is contained in:
37
core/events/player_control.go
Normal file
37
core/events/player_control.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package events
|
||||
|
||||
import (
|
||||
"AynaLivePlayer/core/model"
|
||||
)
|
||||
|
||||
const PlayerVolumeChangeCmd = "cmd.player.op.change_volume"
|
||||
|
||||
type PlayerVolumeChangeCmdEvent struct {
|
||||
Volume float64 // Volume from 0-100
|
||||
}
|
||||
|
||||
const PlayerPlayCmd = "cmd.player.op.play"
|
||||
|
||||
type PlayerPlayCmdEvent struct {
|
||||
Media model.Media
|
||||
}
|
||||
|
||||
const PlayerSeekCmd = "cmd.player.op.seek"
|
||||
|
||||
type PlayerSeekCmdEvent struct {
|
||||
Position float64
|
||||
// Absolute is the seek mode.
|
||||
// if absolute = true : position is the time in second
|
||||
// if absolute = false: position is in percentage eg 0.1 0.2
|
||||
Absolute bool
|
||||
}
|
||||
|
||||
const PlayerToggleCmd = "cmd.player.op.toggle"
|
||||
|
||||
type PlayerToggleCmdEvent struct {
|
||||
}
|
||||
|
||||
const PlayerPlayNextCmd = "cmd.player.op.next"
|
||||
|
||||
type PlayerPlayNextCmdEvent struct {
|
||||
}
|
||||
Reference in New Issue
Block a user