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
|
return session.websocket_connected
|
||||||
}
|
}
|
||||||
|
|
||||||
func (session *SessionCtx) IsReceiving() bool {
|
func (session *SessionCtx) IsWatching() bool {
|
||||||
return session.webrtc_connected
|
return session.webrtc_connected
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ type MemberState struct {
|
|||||||
Event string `json:"event,omitempty"`
|
Event string `json:"event,omitempty"`
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
IsConnected bool `json:"is_connected"`
|
IsConnected bool `json:"is_connected"`
|
||||||
IsReceiving bool `json:"is_receiving"`
|
IsWatching bool `json:"is_watching"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MemberData struct {
|
type MemberData struct {
|
||||||
|
@ -38,7 +38,7 @@ type Session interface {
|
|||||||
|
|
||||||
IsHost() bool
|
IsHost() bool
|
||||||
IsConnected() bool
|
IsConnected() bool
|
||||||
IsReceiving() bool
|
IsWatching() bool
|
||||||
Disconnect(reason string) error
|
Disconnect(reason string) error
|
||||||
|
|
||||||
SetWebSocketPeer(websocket_peer WebSocketPeer)
|
SetWebSocketPeer(websocket_peer WebSocketPeer)
|
||||||
|
@ -23,7 +23,7 @@ func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {
|
|||||||
},
|
},
|
||||||
State: message.MemberState{
|
State: message.MemberState{
|
||||||
IsConnected: session.IsConnected(),
|
IsConnected: session.IsConnected(),
|
||||||
IsReceiving: session.IsReceiving(),
|
IsWatching: session.IsWatching(),
|
||||||
},
|
},
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ func (h *MessageHandlerCtx) SessionStateChanged(session types.Session) error {
|
|||||||
Event: event.MEMBER_STATE,
|
Event: event.MEMBER_STATE,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
IsConnected: session.IsConnected(),
|
IsConnected: session.IsConnected(),
|
||||||
IsReceiving: session.IsReceiving(),
|
IsWatching: session.IsWatching(),
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -39,7 +39,7 @@ func (h *MessageHandlerCtx) systemInit(session types.Session) error {
|
|||||||
},
|
},
|
||||||
State: message.MemberState{
|
State: message.MemberState{
|
||||||
IsConnected: session.IsConnected(),
|
IsConnected: session.IsConnected(),
|
||||||
IsReceiving: session.IsReceiving(),
|
IsWatching: session.IsWatching(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user