record

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log15.New()

Logger defaults to a discard handler (null output). If you wish to enable logging, you can set your own handler like so:

ari.Logger.SetHandler(log15.StderrHandler)
View Source
var RecordingStartTimeout = 1 * time.Second

RecordingStartTimeout is the amount of time to wait for a recording to start before declaring the recording to have failed.

Functions

This section is empty.

Types

type Recorder

type Recorder interface {
	Record(string, *ari.RecordingOptions) (*ari.LiveRecordingHandle, error)
}

A Recorder is anything which can "Record"

type Recording

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

A Recording is a lifecycle managed audio recording

func Record

func Record(bus ari.Subscriber, r Recorder, name string, opts *ari.RecordingOptions) (rec *Recording)

Record starts a recording on the given Recorder.

func (*Recording) Cancel

func (r *Recording) Cancel()

Cancel cancels the recording

func (*Recording) Done

func (r *Recording) Done() chan struct{}

Done returns a channel that is closed when the recording is done

func (*Recording) Err

func (r *Recording) Err() error

Err returns any errors in the recording

func (*Recording) Handle

func (r *Recording) Handle() *ari.LiveRecordingHandle

Handle records the live recording handle

func (*Recording) Status

func (r *Recording) Status() Status

Status returns the status of the recording

type Status

type Status int64

Status is the indicator for recording status

const (
	// InProgress indicates that a recording is still in progress
	InProgress Status = iota

	// Canceled indicates that a recording was canceled (by request)
	Canceled

	// Failed indicates that a recording failed
	Failed

	// Finished indicates that a recording finished normally
	Finished

	// Hangup indicates that a recording was ended due to hangup
	Hangup
)

func (Status) String

func (i Status) String() string

Jump to

Keyboard shortcuts

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