Versions in this module Expand all Collapse all v3 v3.0.0 Jan 22, 2022 Changes in this version + const FormatVersion + var ErrNotTerminal = fmt.Errorf("stdin is not terminal") + var ErrSmallTerminal = fmt.Errorf("terminal too small for frames") + var ErrUnexpectedVersion = fmt.Errorf("unexpected asciicast version") + type Frame struct + Data []byte + Time float64 + Type FrameType + func (f *Frame) UnmarshalJSON(b []byte) error + type FrameSource interface + Err func() error + Frame func() Frame + Header func() Header + Next func() bool + type FrameType string + const InputFrame + const OutputFrame + type FrameUnmarshalError struct + Description string + Index int + func (e *FrameUnmarshalError) Error() string + type Header struct + Height int + Version int + Width int + type OSTerminal struct + func NewOSTerminal() (*OSTerminal, error) + func NewOSTerminalFromFile(file *os.File) (*OSTerminal, error) + func (t *OSTerminal) Close() error + func (t *OSTerminal) Control(control PlaybackControl) + func (t *OSTerminal) Dimensions() (width, height int) + func (t *OSTerminal) Restore() error + func (t *OSTerminal) ToRaw() error + func (t *OSTerminal) Write(p []byte) (n int, err error) + type Option func(*options) + func WithIgnoreSizeCheck() Option + func WithMaxWait(t time.Duration) Option + func WithSpeed(speed float64) Option + type PlaybackControl interface + Pause func() + Stop func() + type Player struct + func NewPlayer(frameSource FrameSource, terminal Terminal, opts ...Option) (*Player, error) + func (p *Player) Pause() + func (p *Player) Start() (err error) + func (p *Player) Stop() + type StreamFrameSource struct + func NewStreamFrameSource(reader io.Reader) (*StreamFrameSource, error) + func (s *StreamFrameSource) Err() error + func (s *StreamFrameSource) Frame() Frame + func (s *StreamFrameSource) Header() Header + func (s *StreamFrameSource) Next() bool + type Terminal interface + Control func(PlaybackControl) + Dimensions func() (width, height int) + Restore func() error + ToRaw func() error Other modules containing this package github.com/xakep666/asciinema-player