Frontend Media Properties¶
This document is auto-generated from the source code in /frontend/scripts/document-media.js.
This is a list of the media properties, with the descriptions of corresponding TypeScript types that are used in the frontend to hold media objects.
General notes¶
The columns are sorted alphabetically. Both interfaces ImageDetail and
AudioDetail inherit from interface Media so the tables for those interfaces
only show their additional fields.
Some types in the “Type” column may refer to interfaces or types defined in the frontend codebase. In such cases it is advised to refer to the source file /frontend/src/types/media.ts and trace the source of the type definitions. Such types are italicised for clarity.
Interface Media¶
Fields¶
Name |
Type |
Optional? |
|---|---|---|
|
|
|
|
|
|
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
|
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
✓ |
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
✓ |
|
||
|
|
Notes¶
id¶
the UUID4 identifier of the media item
See also:
originalTitle¶
the raw name of the creative work, as returned by the API
title¶
the name of the creative work; This involves the following kinds of changes to the original title:
remove the file extension
escape HTML
handle empty titles
Interface ImageDetail¶
Fields¶
Notes¶
height¶
the vertical length of the image in pixels
width¶
the horizontal length of the image in pixels
Interface AudioDetail¶
Fields¶
Name |
Type |
Optional? |
|---|---|---|
|
|
✓ |
|
|
✓ |
|
✓ |
|
|
✓ |
|
|
|
|
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
✓ |
|
|
|
✓ |
Notes¶
bit_rate¶
amount of digital audio data transmitted or processed in unit time; This field holds numbers measured in bits per second.
See also:
duration¶
the time period of the track in milliseconds
sample_rate¶
number of samples for digital representation taken in unit time; This field holds numbers measured in hertz.
See also: