Documentation
¶
Overview ¶
Package voiceapi adapts the versioned voice WebSocket protocol to a coordinator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatPresence ¶
type ChatPresence struct {
Occupied bool `json:"occupied"`
OwnedByBrowser bool `json:"owned_by_browser"`
DeviceKind string `json:"device_kind,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
}
ChatPresence describes the live device holding a voice chat lease.
type Handler ¶
type Handler struct {
Backend backend
Token string
Lease *voice.CallLease
Updates androidUpdateSource
Devices *phonedevice.Hub
Auth *deviceauth.Registry
// contains filtered or unexported fields
}
Handler serves voice calls for one Koder process.
func NewHandler ¶
NewHandler creates a process-scoped voice protocol handler.
func (*Handler) MintBrowserTicket ¶
MintBrowserTicket creates a short-lived, single-use WebSocket credential for an already-connected browser client.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP accepts one authenticated voice call.
func (*Handler) VoiceChatPresence ¶
func (h *Handler) VoiceChatPresence(chatID, browserClientID string) ChatPresence
VoiceChatPresence reports whether a selected voice chat is currently in use.
Click to show internal directories.
Click to hide internal directories.