mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
WebRTC cursor: set initial state.
This commit is contained in:
parent
5310acfbf0
commit
ab34f4a53f
@ -319,6 +319,15 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
|
||||
// TODO: Refactor.
|
||||
manager.curImgListeners[cursorChangePtr] = &cursorChange
|
||||
manager.curPosListeners[cursorPositionPtr] = &cursorPosition
|
||||
|
||||
// send initial cursor image
|
||||
cur := manager.desktop.GetCursorImage()
|
||||
cursorChange(cur)
|
||||
|
||||
// send initial cursor position
|
||||
x, y := manager.desktop.GetCursorPosition()
|
||||
manager.logger.Warn().Int("x", x).Int("y", y).Msg("got cursor position")
|
||||
cursorPosition(x, y)
|
||||
})
|
||||
|
||||
dataChannel.OnMessage(func(message webrtc.DataChannelMessage) {
|
||||
|
Loading…
Reference in New Issue
Block a user