rec

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EveryDay             []time.Weekday = []time.Weekday{time.Sunday, time.Monday, time.Tuesday, time.Wednesday, time.Thursday, time.Friday, time.Saturday}
	JumuaaRecordDuration time.Duration  = 2 * time.Hour
	DarsRecordDuration   time.Duration  = 1 * time.Hour
)

Functions

func SupposedToBeRecording

func SupposedToBeRecording(confs []*RecordConfig) bool

SupposedToBeRecording just what the func name is saying. Please add doc wherever you think it was unreadable, else refactor the portion

Types

type RecordConfig

type RecordConfig struct {
	Description string

	// Only check Hours and Minutes
	StartTime time.Time

	// Duration of the Recording,
	// StopTime is StartTime + Duration
	Duration time.Duration

	// For everyday use helper EveryDay)
	RecordingDays []time.Weekday
}

func GetIqamaRecordingConfigs

func GetIqamaRecordingConfigs() []*RecordConfig

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

func New

func New(host, password string) (*Recorder, error)

func (*Recorder) Disconnect

func (o *Recorder) Disconnect() error

func (*Recorder) DispatchOperation

func (o *Recorder) DispatchOperation(msg string) error

func (*Recorder) IsRecording

func (o *Recorder) IsRecording() (bool, error)

func (*Recorder) StartRecording

func (o *Recorder) StartRecording() error

StartRecording records if didn't start recording, else continue recording for the specified duration

func (*Recorder) StopRecording

func (o *Recorder) StopRecording() error

Jump to

Keyboard shortcuts

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