mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2026-03-15 05:53:17 +08:00
22 lines
495 B
Go
22 lines
495 B
Go
package player
|
|
|
|
import (
|
|
"AynaLivePlayer/core/events"
|
|
"AynaLivePlayer/global"
|
|
"AynaLivePlayer/gui/gctx"
|
|
"AynaLivePlayer/pkg/eventbus"
|
|
)
|
|
|
|
func registerHandlers() {
|
|
global.EventBus.Subscribe(gctx.EventChannel, events.GUISetPlayerWindowOpenCmd, "gui.player.videoplayer.handleopen", func(event *eventbus.Event) {
|
|
data := event.Data.(events.GUISetPlayerWindowOpenCmdEvent)
|
|
if data.SetOpen {
|
|
showPlayerWindow()
|
|
} else {
|
|
if playerWindow != nil {
|
|
playerWindow.Hide()
|
|
}
|
|
}
|
|
})
|
|
}
|