mirror of https://github.com/jetkvm/kvm.git
fix(native): add video init to native start
This commit is contained in:
parent
b9f7b3a787
commit
358981128b
|
|
@ -77,5 +77,7 @@ func (n *Native) Start() {
|
||||||
n.initUI()
|
n.initUI()
|
||||||
go n.tickUI()
|
go n.tickUI()
|
||||||
|
|
||||||
|
videoInit()
|
||||||
|
|
||||||
close(n.ready)
|
close(n.ready)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,13 @@ func (n *Native) VideoSetEDID(edid string) error {
|
||||||
func (n *Native) VideoGetEDID() (string, error) {
|
func (n *Native) VideoGetEDID() (string, error) {
|
||||||
return videoGetEDID()
|
return videoGetEDID()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *Native) VideoStop() error {
|
||||||
|
videoStop()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (n *Native) VideoStart() error {
|
||||||
|
videoStart()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -371,9 +371,9 @@ func onActiveSessionsChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func onFirstSessionConnected() {
|
func onFirstSessionConnected() {
|
||||||
_ = writeCtrlAction("start_video")
|
_ = nativeInstance.VideoStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
func onLastSessionDisconnected() {
|
func onLastSessionDisconnected() {
|
||||||
_ = writeCtrlAction("stop_video")
|
_ = nativeInstance.VideoStop()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue