Masher

Masher Plugin.

interface AddClipsEditArgs 
extends AddClipsEditObject, EditArgs {
  clips: Array<ClientClip>
  createTracks: number
  edits: UndoableEdits
  insertIndex?: number
  redoFrame?: number
  trackIndex: number
  type: string
}
interface AddClipsEditObject 
extends AddTrackEditObject {
  clips: Array<ClientClip>
  createTracks: number
  insertIndex?: number
  redoFrame?: number
  trackIndex: number
  type: string
}
interface AddTrackEditArgs 
extends AddTrackEditObject, EditArgs {
  createTracks: number
  edits: UndoableEdits
  type: string
}
interface AddTrackEditObject 
extends WithType {
  createTracks: number
  type: string
}
interface ChangeEdit 
extends UndoableEdit {
  affects: Array<SignalId>
  isChange: boolean
  redo: () => void
  target: Propertied
  type: string
  undo: () => void
  updateEdit: (object: ChangeEditObject) => void
  updateSelection: () => void
  values: ScalarsById
}
interface ChangeEditArgs 
extends ChangeEditObject, EditArgs {
  edits: UndoableEdits
  isChange?: boolean
  target: Propertied
  type: string
}
interface ChangeEditObject 
extends WithType {
  isChange?: boolean
  target: Propertied
  type: string
}
interface ChangePropertiesEdit 
extends ChangeEdit {
  affects: Array<SignalId>
  isChange: boolean
  redo: () => void
  redoValues: ScalarsById
  target: Propertied
  type: string
  undo: () => void
  undoValues: ScalarsById
  updateEdit: (object: ChangeEditObject) => void
  updateSelection: () => void
  values: ScalarsById
}
interface ChangePropertiesEditArgs 
extends ChangePropertiesEditObject, EditArgs {
  edits: UndoableEdits
  isChange?: boolean
  redoValues: ScalarsById
  target: Propertied
  type: string
  undoValues: ScalarsById
}
interface ChangePropertiesEditObject 
extends ChangeEditObject {
  isChange?: boolean
  redoValues: ScalarsById
  target: Propertied
  type: string
  undoValues: ScalarsById
}
interface ChangePropertyEdit 
extends ChangeEdit {
  affects: Array<SignalId>
  isChange: boolean
  property: SignalId
  redo: () => void
  target: Propertied
  type: string
  undo: () => void
  updateEdit: (object: ChangeEditObject) => void
  updateSelection: () => void
  value?: Scalar
  valueNumber?: number
  values: ScalarsById
}
interface ChangePropertyEditArgs 
extends ChangePropertyEditObject, EditArgs {
  edits: UndoableEdits
  isChange?: boolean
  property: SignalId
  redoValue?: Scalar
  target: Propertied
  type: string
  undoValue?: Scalar
}
interface ChangePropertyEditObject 
extends ChangeEditObject {
  isChange?: boolean
  property: SignalId
  redoValue?: Scalar
  target: Propertied
  type: string
  undoValue?: Scalar
}
interface ClientDescriptionArgs  {
  clip: ClientClip
  mashDescription: ClientMashDescription
}
interface ClientMashDescription 
extends MashDescription {
  border: number
  borderColor: string
  elementsPromise: () => Promise<Array<SvgItem>>
  host: Plugins
  mash: MashMedia
  rect: Rect
  selectedClip?: Clip
  signals: SignalsRecord
  time: Time
}
interface CodeDescription  {
  commandFilters: Array<CommandFilter>
  duration: number
  inputsById: CommandInputRecord
}
interface EditArgs 
extends WithType {
  edits: UndoableEdits
  type: string
}
interface MashDescription  {
  host: Plugins
  mash: MashMedia
  time: Time
}
interface MashDescriptionArgs 
extends MashDescriptionOptions {
  clip?: Clip
  frame?: number
  frames?: number
  mash: MashMedia
  mediaType?: MediaType
  time?: Time
}
interface MashDescriptionOptions  {
  clip?: Clip
  frame?: number
  frames?: number
  mediaType?: MediaType
  time?: Time
}
interface MashPreview  {
  clip: ClientClip
  /** Clip content and container SVG. */
  svgItem: (animate: boolean) => SvgItem
  /** Clip outline and bounds SVGs. */
  svgItems: (lineClasses: Strings, handleClasses: Strings, inactive?: boolean) => Array<SvgItem>
}
interface MashPreviewsArgs 
extends MashPreviewsOptions {
  border?: number
  borderColor?: string
  clip?: Clip
  frame?: number
  frames?: number
  immutable?: boolean
  mash: ClientMash
  mediaType?: MediaType
  rect: Rect
  selectedClip?: ClientClip
  time?: Time
}
interface MashPreviewsOptions 
extends MashDescriptionOptions {
  border?: number
  borderColor?: string
  clip?: Clip
  frame?: number
  frames?: number
  immutable?: boolean
  mediaType?: MediaType
  rect: Rect
  selectedClip?: ClientClip
  time?: Time
}
interface Masher  {}
interface MasherArgs  {
  fps?: number
  masherMedia: MasherMedia
  mediaMasher: MediaMasherNode
  type: MediaType
}
type MasherEditFunction = (args: EditArgs, opts?: ClientJobOptions) => Promise<UndoableEdit>
type MasherEditsFunction = (args: MasherMedia, opts?: ClientJobOptions) => Promise<UndoableEdits>
/** Error that has been caught or generated. */
interface MasherError  {
  cause?: MasherError | string
  message: string
  name: ErrorName
}
type MasherMasherFunction = (args: MasherArgs, opts?: ClientJobOptions) => Promise<DataOrError<Masher>>
interface MasherMedia  {
  find: (detail: ApiFindRequest) => Promise<DataOrError<Array<Media>>>
  loadMedia: (storabledMedia: unknown) => Promise<DataOrError<ClientMash>>
  loadedMash?: ClientMash
  mash: (args?: ApiMashRequest) => Promise<DataOrError<ClientMash>>
  mediaCreate: (object: Array<(StorableMedia|Media)>) => Promise<DataOrError<Array<Media>>>
  mediaFromId: (id?: string) => Media | undefined
  remove: (args: ApiRemoveRequest) => Promise<DataOrError<Numbers>>
}
interface MasherMediaArgs  {
  plugins: ClientMediaMasher
}
type MasherMediaFunction = (args: MasherMediaArgs, opts?: ClientJobOptions) => Promise<DataOrError<MasherMedia>>
interface MasherPlugin 
extends Plugable {
  edit: MasherEditFunction
  edits: MasherEditsFunction
  host: Plugins
  install: function
  masher: MasherMasherFunction
  media: MasherMediaFunction
  svgs: MasherSvgsFunction
}
interface MasherPluginOptions  {
  alwaysShowEncode?: boolean
  alwaysShowSave?: boolean
  alwaysShowView?: boolean
}
type MasherSvgsFunction = (args: MashPreviewsArgs, opts?: ClientJobOptions) => Promise<ClientMashDescription>
interface MasherSyncCode  {
  media: Media
  rawResource: Resource
}
interface MasherSyncDecode 
extends MasherSyncCode {
  media: Media
  rawResource: Resource
}
interface MasherSyncTranscode 
extends MasherSyncCode {
  media: Media
  rawResource: Resource
  transcodingSource: TranscodingSource
}
interface MoveClipEditArgs 
extends MoveClipEditObject, EditArgs {
  clip: ClientClip
  createTracks: number
  edits: UndoableEdits
  insertIndex?: number
  redoFrame?: number
  trackIndex: number
  type: string
  undoFrame?: number
  undoInsertIndex?: number
  undoTrackIndex: number
}
interface MoveClipEditObject 
extends AddTrackEditObject {
  clip: ClientClip
  createTracks: number
  insertIndex?: number
  redoFrame?: number
  trackIndex: number
  type: string
  undoFrame?: number
  undoInsertIndex?: number
  undoTrackIndex: number
}
interface RemoveClipEditArgs 
extends RemoveClipEditObject, EditArgs {
  clip: ClientClip
  edits: UndoableEdits
  index: number
  track: ClientTrack
  type: string
}
interface RemoveClipEditObject 
extends WithType {
  clip: ClientClip
  index: number
  track: ClientTrack
  type: string
}
interface ServerDescriptionArgs 
extends MashDescriptionArgs {
  audioRate?: number
  background?: string
  clip?: Clip
  encodePath: AbsolutePath
  frame?: number
  frames?: number
  jobPath: AbsolutePath
  mash: MashMedia
  mediaType?: MediaType
  mute?: boolean
  outputOptions?: OutputOptions
  size?: Size
  time?: Time
  videoRate?: number
}
interface ServerMashDescription 
extends MashDescription {
  audioRate: number
  background: string
  duration: number
  encodeCommandsPromise: () => Promise<DataOrError<EncodeCommands>>
  encodePath: AbsolutePath
  host: Plugins
  intrinsicsPromise: Promise<DataOrError<number>>
  jobPath: AbsolutePath
  mash: MashMedia
  mediaType: MediaType
  needsPrecoding: boolean
  precodeCommandsPromise: () => Promise<DataOrError<PrecodeCommands>>
  precodingsByClipId: Record<string, AbsolutePath>
  size: Size
  time: Time
  videoRate: number
}
interface SplitClipEditArgs 
extends SplitClipEditObject, EditArgs {
  containerRedoValues?: ScalarsById
  containerUndoValues?: ScalarsById
  edits: UndoableEdits
  frame: number
  index: number
  isChange?: boolean
  redoValues: ScalarsById
  splitClip: ClientClip
  target: Propertied
  type: string
  undoValues: ScalarsById
}
interface SplitClipEditObject 
extends ChangePropertiesEditObject {
  containerRedoValues?: ScalarsById
  containerUndoValues?: ScalarsById
  frame: number
  index: number
  isChange?: boolean
  redoValues: ScalarsById
  splitClip: ClientClip
  target: Propertied
  type: string
  undoValues: ScalarsById
}
interface UndoableEdit 
extends WithType {
  affects: Array<SignalId>
  isChange: boolean
  redo: () => void
  type: string
  undo: () => void
  updateSelection: () => void
}
interface UndoableEdits  {
  canRedo: boolean
  canUndo: boolean
  create: (object: WithType) => Promise<void>
  mash: ClientMash
  redo: () => UndoableEdit | undefined
  save: () => void
  signals: SignalsRecord
  undo: () => UndoableEdit | undefined
}
/** @implements MashDescription */
class MashDescriptionClass {
  host: Plugins
  mash: MashMedia
  mediaType: () => MediaType
  quantize: () => number
  time: Time
}
/** @implements ServerMashDescription */
class ServerMashDescriptionClass
extends MashDescriptionClass {
  args: ServerDescriptionArgs
  audioRate: number
  background: string
  duration: number
  encodeCommandsPromise: () => Promise<DataOrError<EncodeCommands>>
  encodeMashCommands: () => Promise<EncodeCommands>
  encodePath: AbsolutePath
  host: Plugins
  intrinsicsPromise: Promise<DataOrError<number>>
  jobPath: AbsolutePath
  mash: MashMedia
  mediaType: MediaType
  needsPrecoding: boolean
  opts: ServerJobOptions
  precodeCommandsPromise: () => Promise<DataOrError<PrecodeCommands>>
  precodingsByClipId: Record<string, AbsolutePath>
  quantize: () => number
  size: Size
  time: Time
  videoRate: number
}
/** Type guard for ChangeEdit */
function isChangeEdit(
  value: unknown
): boolean
/** Type guard for ChangeEditObject */
function isChangeEditObject(
  value: unknown
): boolean
/** Type guard for ChangePropertyEdit */
function isChangePropertyEdit(
  value: unknown
): boolean
/** Type guard for ChangePropertyEditObject */
function isChangePropertyEditObject(
  value: unknown
): boolean
/** Type guard for UndoableEdit */
function isUndoableEdit(
  value: unknown
): boolean