is_receiving - is_watching.

This commit is contained in:
Miroslav Šedivý 2020-12-06 19:02:33 +01:00
parent e17e2cb606
commit c714d17d87
5 changed files with 6 additions and 6 deletions

View File

@ -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
}

View File

@ -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 {

View File

@ -38,7 +38,7 @@ type Session interface {
IsHost() bool
IsConnected() bool
IsReceiving() bool
IsWatching() bool
Disconnect(reason string) error
SetWebSocketPeer(websocket_peer WebSocketPeer)

View File

@ -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

View File

@ -39,7 +39,7 @@ func (h *MessageHandlerCtx) systemInit(session types.Session) error {
},
State: message.MemberState{
IsConnected: session.IsConnected(),
IsReceiving: session.IsReceiving(),
IsWatching: session.IsWatching(),
},
}
}