mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2026-04-05 02:45:18 +08:00
20 lines
462 B
Go
20 lines
462 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 {
|
|
playerWindow.Close()
|
|
} else {
|
|
showPlayerWindow()
|
|
}
|
|
})
|
|
}
|