From c714d17d870b1274a1b95abb7b15de40aec7a887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 6 Dec 2020 19:02:33 +0100 Subject: [PATCH] is_receiving - is_watching. --- internal/session/session.go | 2 +- internal/types/message/messages.go | 2 +- internal/types/session.go | 2 +- internal/websocket/handler/session.go | 4 ++-- internal/websocket/handler/system.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/session/session.go b/internal/session/session.go index 1542fb3b..4d74c691 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -71,7 +71,7 @@ func (session *SessionCtx) IsConnected() bool { return session.websocket_connected } -func (session *SessionCtx) IsReceiving() bool { +func (session *SessionCtx) IsWatching() bool { return session.webrtc_connected } diff --git a/internal/types/message/messages.go b/internal/types/message/messages.go index 353ad52d..3d5ca749 100644 --- a/internal/types/message/messages.go +++ b/internal/types/message/messages.go @@ -70,7 +70,7 @@ type MemberState struct { Event string `json:"event,omitempty"` ID string `json:"id,omitempty"` IsConnected bool `json:"is_connected"` - IsReceiving bool `json:"is_receiving"` + IsWatching bool `json:"is_watching"` } type MemberData struct { diff --git a/internal/types/session.go b/internal/types/session.go index 347a36c1..0d753e24 100644 --- a/internal/types/session.go +++ b/internal/types/session.go @@ -38,7 +38,7 @@ type Session interface { IsHost() bool IsConnected() bool - IsReceiving() bool + IsWatching() bool Disconnect(reason string) error SetWebSocketPeer(websocket_peer WebSocketPeer) diff --git a/internal/websocket/handler/session.go b/internal/websocket/handler/session.go index 9dd36775..d17f9c04 100644 --- a/internal/websocket/handler/session.go +++ b/internal/websocket/handler/session.go @@ -23,7 +23,7 @@ func (h *MessageHandlerCtx) SessionCreated(session types.Session) error { }, State: message.MemberState{ IsConnected: session.IsConnected(), - IsReceiving: session.IsReceiving(), + IsWatching: session.IsWatching(), }, }, nil) @@ -105,7 +105,7 @@ func (h *MessageHandlerCtx) SessionStateChanged(session types.Session) error { Event: event.MEMBER_STATE, ID: session.ID(), IsConnected: session.IsConnected(), - IsReceiving: session.IsReceiving(), + IsWatching: session.IsWatching(), }, nil) return nil diff --git a/internal/websocket/handler/system.go b/internal/websocket/handler/system.go index 5572b96a..cacd28ec 100644 --- a/internal/websocket/handler/system.go +++ b/internal/websocket/handler/system.go @@ -39,7 +39,7 @@ func (h *MessageHandlerCtx) systemInit(session types.Session) error { }, State: message.MemberState{ IsConnected: session.IsConnected(), - IsReceiving: session.IsReceiving(), + IsWatching: session.IsWatching(), }, } }