mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
is_receiving - is_watching.
This commit is contained in:
parent
e17e2cb606
commit
c714d17d87
@ -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
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -38,7 +38,7 @@ type Session interface {
|
||||
|
||||
IsHost() bool
|
||||
IsConnected() bool
|
||||
IsReceiving() bool
|
||||
IsWatching() bool
|
||||
Disconnect(reason string) error
|
||||
|
||||
SetWebSocketPeer(websocket_peer WebSocketPeer)
|
||||
|
@ -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
|
||||
|
@ -39,7 +39,7 @@ func (h *MessageHandlerCtx) systemInit(session types.Session) error {
|
||||
},
|
||||
State: message.MemberState{
|
||||
IsConnected: session.IsConnected(),
|
||||
IsReceiving: session.IsReceiving(),
|
||||
IsWatching: session.IsWatching(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user