Skip to main content

AudioAttachmentView

@retinue/monorepo


@retinue/monorepo / frontend/src / AudioAttachmentView

Type Alias: AudioAttachmentView

AudioAttachmentView = object

Defined in: frontend/src/audio.ts:41

What a player needs, and nothing more.

src is deliberately not built here. A file's URL depends on the deployment's own file route and on whatever signing it uses, and a view model that guessed /files/${fileId} would be right for the reference app and wrong for everyone else. The caller supplies a resolver; this decides whether to show a player and what to label it.

Properties​

byteSize?​

readonly optional byteSize?: number

Defined in: frontend/src/audio.ts:45


durationSeconds?​

readonly optional durationSeconds?: number

Defined in: frontend/src/audio.ts:47

Absent when unknown, which is the common case for generated speech.


fileId​

readonly fileId: string

Defined in: frontend/src/audio.ts:42


filename?​

readonly optional filename?: string

Defined in: frontend/src/audio.ts:43


generated​

readonly generated: boolean

Defined in: frontend/src/audio.ts:56

Whether this arrived as a generated artifact rather than as something a person uploaded.

Surfaced because the two deserve different treatment in an interface: a recording the user attached is theirs and already familiar, while generated speech is the assistant's output and worth marking as such.


label​

readonly label: string

Defined in: frontend/src/audio.ts:49

A short label: the filename, or the duration, or the format. Never empty.


mediaType​

readonly mediaType: string

Defined in: frontend/src/audio.ts:44