MotionScript

@motion-script/core


@motion-script/core / AudioRequest

Interface: AudioRequest

Defined in: attributes/audio/request.ts:12

Properties

endAt

endAt: number

Defined in: attributes/audio/request.ts:33

The scene timestamp when the audio should STOP playing.

Always a number, and Infinity is the open/unbounded sentinel — never null or undefined. A startSound left running carries Infinity until open resolution pins it to the project end, and Sound.playRanges is the one place it is projected to null, for display only.

So test it with Number.isFinite(endAt). A ?? Infinity or !== null guard is dead code that reads as if the field were nullable.


filters?

optional filters?: AudioFilterItem[]

Defined in: attributes/audio/request.ts:65

Audio filters applied in array order (index 0 closest to the source).


id

id: string

Defined in: attributes/audio/request.ts:13


loop

loop: boolean

Defined in: attributes/audio/request.ts:60


mediaDuration?

optional mediaDuration?: number

Defined in: attributes/audio/request.ts:50

Source media length in seconds, carried on open requests so the cross-scene end can be resolved at assembly time without re-reading the asset catalog. Ignored for bounded requests.


open?

optional open?: boolean

Defined in: attributes/audio/request.ts:43

True when this request was started (startSound) and left running at its scene's end — neither explicitly stopped nor finite-trimmed. Open requests are exempt from the per-scene audio clamp and instead continue across scene boundaries: assembleTimeline shifts them to absolute time and resolves endAt = min(startAt + mediaDuration, projectTotalDuration) (a looped open request runs to the project end). Bounded requests are unaffected.


ownerPath?

optional ownerPath?: string

Defined in: attributes/audio/request.ts:76

Structural path (see nodePath) of the node that emitted this request, stamped during the precomp prepare walk. Lets the timeline draw the clip's waveform on its owning node's bar — a Video's clip on the Video row, a scene's playSound on the scene row. Undefined for requests added outside a node walk; those fall back to the scene root. Never affects playback.


src

src: string

Defined in: attributes/audio/request.ts:15

The asset path or URL. ('src' is standard for media)


startAt

startAt: number

Defined in: attributes/audio/request.ts:20

The scene timestamp when the audio should START playing.


trimStart

trimStart: number

Defined in: attributes/audio/request.ts:55

Offset in seconds to skip ahead in the audio file. Default: 0


volume

volume: number

Defined in: attributes/audio/request.ts:59