fix(native): add video init to native start

This commit is contained in:
Siyuan Miao 2025-09-24 20:54:14 +00:00
parent b9f7b3a787
commit 358981128b
3 changed files with 14 additions and 2 deletions

View File

@ -77,5 +77,7 @@ func (n *Native) Start() {
n.initUI()
go n.tickUI()
videoInit()
close(n.ready)
}

View File

@ -23,3 +23,13 @@ func (n *Native) VideoSetEDID(edid string) error {
func (n *Native) VideoGetEDID() (string, error) {
return videoGetEDID()
}
func (n *Native) VideoStop() error {
videoStop()
return nil
}
func (n *Native) VideoStart() error {
videoStart()
return nil
}

View File

@ -371,9 +371,9 @@ func onActiveSessionsChanged() {
}
func onFirstSessionConnected() {
_ = writeCtrlAction("start_video")
_ = nativeInstance.VideoStart()
}
func onLastSessionDisconnected() {
_ = writeCtrlAction("stop_video")
_ = nativeInstance.VideoStop()
}