mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
sessions in private still get cursor info & send inactive.
This commit is contained in:
parent
470f670865
commit
149d74150b
@ -203,8 +203,6 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
|
||||
setPaused: func(isPaused bool) {
|
||||
videoTrack.SetPaused(isPaused)
|
||||
audioTrack.SetPaused(isPaused)
|
||||
|
||||
// TODO: Send fresh cursor position & image when unpausing.
|
||||
},
|
||||
iceTrickle: manager.config.ICETrickle,
|
||||
}
|
||||
@ -320,22 +318,12 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
|
||||
})
|
||||
|
||||
cursorImage := func(entry *cursor.ImageEntry) {
|
||||
// TODO: Refactor.
|
||||
if videoTrack.paused {
|
||||
return
|
||||
}
|
||||
|
||||
if err := peer.SendCursorImage(entry.Cursor, entry.Image); err != nil {
|
||||
logger.Err(err).Msg("could not send cursor image")
|
||||
}
|
||||
}
|
||||
|
||||
cursorPosition := func(x, y int) {
|
||||
// TODO: Refactor.
|
||||
if videoTrack.paused {
|
||||
return
|
||||
}
|
||||
|
||||
if session.IsHost() {
|
||||
return
|
||||
}
|
||||
@ -368,11 +356,6 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, videoID strin
|
||||
})
|
||||
|
||||
dataChannel.OnMessage(func(message webrtc.DataChannelMessage) {
|
||||
// TODO: Refactor.
|
||||
if videoTrack.paused {
|
||||
return
|
||||
}
|
||||
|
||||
if err := manager.handle(message.Data, session); err != nil {
|
||||
logger.Err(err).Msg("data handle failed")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user