Versions in this module Expand all Collapse all v0 v0.1.0 Apr 23, 2026 Changes in this version + const Version + var DylibPath = "" + var ErrAlreadyStarted = errors.New("kinrec: recorder already started") + var ErrNotStarted = errors.New("kinrec: recorder not started") + var ErrPermissionDenied = errors.New("kinrec: screen recording permission denied") + func Load() error + func Record(ctx context.Context, duration time.Duration, opts ...Option) error + func ResolvedDylibPath() string + type Codec int + const CodecH264 + const CodecHEVC + type Container int + const ContainerMOV + const ContainerMP4 + type Display struct + Height int + ID uint32 + Width int + func ListDisplays(ctx context.Context) ([]Display, error) + type Mic struct + IsDefault bool + Name string + UniqueID string + func ListMics(ctx context.Context) ([]Mic, error) + type Option func(*config) + func WithAudio(enabled bool) Option + func WithCodec(codec Codec) Option + func WithContainer(container Container) Option + func WithCursorHighlight(enabled bool) Option + func WithDisplay(id uint32) Option + func WithFrameRate(fps int) Option + func WithMic(enabled bool) Option + func WithMicDevice(uniqueID string) Option + func WithOutput(path string) Option + func WithResolution(w, h int) Option + type Recorder struct + func NewRecorder(ctx context.Context, opts ...Option) (*Recorder, error) + func (r *Recorder) Start(ctx context.Context) error + func (r *Recorder) Stats() Stats + func (r *Recorder) Stop(ctx context.Context) error + type Stats struct + AudioBuffers int64 + Frames int64