agenda

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agenda

type Agenda struct {

	// Title is the title of the performance
	Title string `json:"title" yaml:"title"`

	// Formats defines the set of audio file formats to be supported.  This is optional and if not specified, "webm" will be assumed.
	Formats []string `json:"formats" yaml:"formats"`

	// Cues describe specific points in time in a performance
	Cues []*Cue `json:"cues" yaml:"cues"`

	// Rooms describe virtual rooms in which audio may be played
	Rooms []*Room `json:"rooms" yaml:"rooms"`

	// Announcements describe broadcast messages which will be played across any
	// number of rooms
	Announcements []*Announcement `json:"announcements" yaml:"announcements"`

	// PerformanceURL is the URL to which clients should be redirected when the
	// performance is about to start.  Generally, it will be of the form:
	// `https://yourserver.com/live`, as `live` is the path at which Audimance's
	// live interface may be found.
	//
	// This setting is optional but recommended.
	PerformanceURL string `json:"performanceURL" yaml:"performanceURL"`

	// RemoteMedia indicates that the media files are not stored on the same
	// server, and so not validation should be performed, and no modifications
	// of the prefix be made.  This is not recommended.
	RemoteMedia bool `json:"remoteMedia" yaml:"remoteMedia"`
}

Agenda describes the order of service and details of a performance

func New

func New(filename string) (*Agenda, error)

New attempts to load an agenda from the given filename

func (*Agenda) AllTracks

func (a *Agenda) AllTracks() (out []*Track)

AllTracks returns the list of all tracks for all rooms and announcements so that they may be prefetched.

type Announcement

type Announcement struct {
	Track `json:"track" yaml:"track"`

	// Name is the unique, human-friendly name for this announcement
	Name string `json:"name" yaml:"name"`

	// ExcludeRooms is the list of room names in which this announcement should
	// NOT be played
	ExcludeRooms []string `json:"excludeRooms" yaml:"excludeRooms"`
}

Announcement is a set of audio tracks to be played to many rooms at a given cue

type Cue

type Cue struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// Name is the unique, human-friendly name for this cue
	Name string `json:"name" yaml:"name"`

	// QLabID is the unique identifier for this cue in QLab (informational only;
	// not used by Audimance)
	QLabID string `json:"qlabID" yaml:"qlabID"`

	// Data is the expected data to be received on the QLab port to indicate
	// when this cue should be fired
	Data string `json:"data" yaml:"data"`

	// PerformanceRedirect indicates that when this cue is received, clients
	// should be transferred to the live PerformanceURL
	PerformanceRedirect bool `json:"performanceRedirect" yaml:"performanceRedirect"`

	// ReferenceSeconds is a reference count of the number of seconds the cue
	// should last before the next one.  This is informational only and will be
	// displayed in the administrative control panel if supplied.
	ReferenceSeconds int64 `json:"referenceSeconds" yaml:"referenceSeconds"`
}

Cue describes a specific point in time, with respect to the performance timeline

func (*Cue) FormattedReferenceTime

func (c *Cue) FormattedReferenceTime() string

FormattedReferenceTime returns the human-readable format of the cue's ReferenceSeconds, if there is one

type Point

type Point struct {
	X float64 `json:"x" yaml:"x"`
	Y float64 `json:"y" yaml:"y"`
	Z float64 `json:"z" yaml:"z"`
}

Point is a 3-dimensional point in space

type Room

type Room struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// Name is the unique, human-friendly name for this room
	Name string `json:"name" yaml:"name"`

	// LabelText indicates the textual label to be displayed in the menu for
	// users to select this room
	LabelText string `json:"labelText" yaml:"labelText"`

	// Sources describes the set of locations and audio files which will be
	// played.
	Sources []*Source `json:"sources" yaml:"sources"`

	// RoomTracks is a list of audio tracks to be played in a room, sourced from
	// everywhere.  This is generally exclusive with Sources.
	RoomTracks []*Track `json:"roomTracks" yaml:"roomTracks"`
}

Room describes a virtual room in which audio may be played

func (*Room) AllTracks

func (r *Room) AllTracks() (out []*Track)

AllTracks returns the list of all tracks for the room so that they may be preloaded.

type Source

type Source struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// Name is the unique, human-friendly name for this source
	Name string `json:"name" yaml:"name"`

	// Location indicates a specific 3-dimensional coordinate in the room from
	// which the audio of this source emanates
	Location Point `json:"location" yaml:"location"`

	// Tracks is the list of audio tracks which should be played upon reaching a
	// particular cue
	Tracks []*Track `json:"tracks" yaml:"tracks"`
}

Source describes a unique audio sequence and location

type Track

type Track struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// LoadCue indicates the cue at which the track should be loaded.  This will generally be the cue immediately preceding the Cue
	LoadCue string `json:"loadCue" yaml:"loadCue"`

	// LoadWindow indicates the amount of time (in seconds) to allow for the
	// random loading of the audio.  Tracks are loaded at random times between
	// LoadCue's trigger and LoadWindow's duration therefrom to prevent a
	// thundering herd.
	LoadWindow float64 `json:"loadWindow" yaml:"loadWindow"`

	// Cue is the unique identifier of the cue at which this track should be
	// played
	Cue string `json:"cue" yaml:"cue"`

	// KillCue indicates the cue at which the track should be killed whether it has finished or not
	KillCue string `json:"killCue" yaml:"killCue"`

	// AudioFilePrefix is the path/name prefix of the audio file locations,
	// relative to the filesystem `media/` directory.  The file extension will
	// be calculated based on the supplied format list of the agenda.
	AudioFilePrefix string `json:"audioFilePrefix" yaml:"audioFilePrefix"`

	// AudioFiles is the user-supplied location of the audio file, relative to
	// the filesystem `media/` directory.  Generally, this will be populated
	// automatically by the combination of AudioFilePrefix and the top-level
	// Formats list.
	AudioFiles []string `json:"audioFiles" yaml:"audioFiles"`

	// Repeat indicates whether the PlaySet should be repeated after it is
	// completed.  This will cause the PlaySet to be continually played.
	Repeat bool `json:"repeat" yaml:"repeat"`
}

Track represents a single set of potentially-cued audio files

Jump to

Keyboard shortcuts

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