private mode implementation.

This commit is contained in:
Miroslav Šedivý
2022-03-26 23:20:38 +01:00
parent f549171ded
commit d004ddd68f
12 changed files with 160 additions and 11 deletions

View File

@ -27,6 +27,7 @@ type Session interface {
Profile() MemberProfile
State() SessionState
IsHost() bool
PrivateModeEnabled() bool
// cursor
SetCursor(cursor Cursor)
@ -55,6 +56,9 @@ type SessionManager interface {
GetHost() Session
ClearHost()
SetPrivateMode(isPrivateMode bool)
PrivateMode() bool
SetCursor(cursor Cursor, session Session)
PopCursors() map[Session][]Cursor
@ -69,6 +73,7 @@ type SessionManager interface {
OnProfileChanged(listener func(session Session))
OnStateChanged(listener func(session Session))
OnHostChanged(listener func(session Session))
OnPrivateModeChanged(listener func(isPrivateMode bool))
ImplicitHosting() bool
InactiveCursors() bool

View File

@ -26,6 +26,8 @@ type WebRTCPeer interface {
SetCandidate(candidate webrtc.ICECandidateInit) error
SetVideoID(videoID string) error
SetPaused(isPaused bool) error
SendCursorPosition(x, y int) error
SendCursorImage(cur *CursorImage, img []byte) error