Documentation
¶
Index ¶
- func ClearLocalFrame()
- func ClearRemoteFrame()
- func EnsureRenderer(ctx context.Context)
- func NetRateSnapshot() (txAudio, txVideo, rxAudio, rxVideo float64)
- func PeerLatencySnapshot() time.Duration
- func PeerSlot() (cols, rows int, ok bool)
- func RequestRedraw()
- func SelfSlot() (cols, rows int, ok bool)
- func SetColorFilter(key string)
- func SetCopyableStatus(msg, clipboard string)
- func SetLocalFrame(frame *codec.TextFrame) bool
- func SetPeerTermSize(cols, rows int)
- func SetRemoteFrame(frame *codec.TextFrame) bool
- func SetStatusMessage(msg string)
- func SetVideoFPSLimit(fps int)
- func UpdatePeerLatency(latency time.Duration)
- func UpdateRxAudioRate(kBps float64)
- func UpdateRxVideoRate(kBps float64)
- func UpdateTxAudioRate(kBps float64)
- func UpdateTxVideoRate(kBps float64)
- type TermSize
- type TermSizeFeed
- type ViewportSize
- type ViewportSizeFeed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearLocalFrame ¶
func ClearLocalFrame()
ClearLocalFrame removes the cached local preview so the UI can fall back to status text.
func ClearRemoteFrame ¶
func ClearRemoteFrame()
ClearRemoteFrame removes the cached remote preview, allowing the UI to show status text.
func EnsureRenderer ¶
EnsureRenderer starts the terminal renderer loop once. Subsequent calls are no-ops.
func NetRateSnapshot ¶
func NetRateSnapshot() (txAudio, txVideo, rxAudio, rxVideo float64)
func PeerLatencySnapshot ¶
func RequestRedraw ¶
func RequestRedraw()
RequestRedraw enqueues a redraw event for the terminal renderer.
func SetColorFilter ¶
func SetColorFilter(key string)
SetColorFilter applies a named tint to subsequent frame renders. Empty key clears the filter.
func SetCopyableStatus ¶
func SetCopyableStatus(msg, clipboard string)
SetCopyableStatus shows the provided message and makes it clickable so the text is copied via OSC-52.
func SetLocalFrame ¶
SetLocalFrame updates the cached local preview frame if the viewport is ready. It returns true when the frame was accepted.
func SetPeerTermSize ¶
func SetPeerTermSize(cols, rows int)
SetPeerTermSize updates the cached viewport slot dimensions requested by the remote peer.
func SetRemoteFrame ¶
SetRemoteFrame updates the cached remote preview frame. It returns true when the frame was accepted.
func SetStatusMessage ¶
func SetStatusMessage(msg string)
SetStatusMessage updates the fallback text rendered when no frames are available. The message is trimmed; pass an empty string to clear it.
func SetVideoFPSLimit ¶ added in v0.1.0
func SetVideoFPSLimit(fps int)
SetVideoFPSLimit changes how often viewport frames are accepted. Pass <=0 to disable throttling.
func UpdatePeerLatency ¶
func UpdateRxAudioRate ¶
func UpdateRxAudioRate(kBps float64)
func UpdateRxVideoRate ¶
func UpdateRxVideoRate(kBps float64)
func UpdateTxAudioRate ¶
func UpdateTxAudioRate(kBps float64)
func UpdateTxVideoRate ¶
func UpdateTxVideoRate(kBps float64)
Types ¶
type TermSizeFeed ¶
TermSizeFeed exposes a stream of terminal size events along with the last known size. Call Stop when the consumer no longer needs updates.
func NewTermSizeFeed ¶
func NewTermSizeFeed(ctx context.Context) TermSizeFeed
NewTermSizeFeed creates a TermSizeFeed bound to ctx. When ctx is canceled or Stop is invoked, the feed stops forwarding updates and the Updates channel is closed.
type ViewportSize ¶
type ViewportSizeFeed ¶
type ViewportSizeFeed struct {
Updates <-chan ViewportSize
Initial *ViewportSize
Stop func()
}
ViewportSizeFeed exposes a stream of viewport size requests learned from the local layout.
func NewViewportFeed ¶
func NewViewportFeed(ctx context.Context) ViewportSizeFeed
NewViewportFeed creates a ViewportSizeFeed bound to ctx.