voiceapi

package
v0.0.0-...-d9e29ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func NewHandler(backend backend, token string) *Handler

NewHandler creates a process-scoped voice protocol handler.

func (*Handler) MintBrowserTicket

func (h *Handler) MintBrowserTicket(clientID string) (string, time.Time, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL