UNPKG

@googleforcreators/media

Version:

Functionality for creating and working with media resources in the Web Stories editor.

113 lines 5.69 kB
/** * External dependencies */ import * as PropTypes from 'prop-types'; import type { Requireable } from 'prop-types'; export declare const BackgroundAudioPropTypeShape: { id: PropTypes.Requireable<number>; src: PropTypes.Requireable<string>; length: PropTypes.Requireable<number>; lengthFormatted: PropTypes.Requireable<string>; mimeType: PropTypes.Requireable<string>; needsProxy: PropTypes.Requireable<boolean>; }; export declare const BackgroundAudioPropType: PropTypes.Requireable<PropTypes.InferProps<{ id: PropTypes.Requireable<number>; src: PropTypes.Requireable<string>; length: PropTypes.Requireable<number>; lengthFormatted: PropTypes.Requireable<string>; mimeType: PropTypes.Requireable<string>; needsProxy: PropTypes.Requireable<boolean>; }>>; export declare const ResourcePropTypes: Record<string, Requireable<unknown>>; /** * Author object * * @typedef {Author} Author * @property {string} displayName The display name of the author. * @property {?string} url An optional URL to link to the author's profile or * website. */ /** * Attribution object * * @typedef {Attribution} Attribution * @property {?Author} author The optional author of the media object. * @property {?string} registerUsageUrl The optional url to register the media * usage. */ /** * TrimData object * * @typedef {TrimData} TrimData data object linking a trimmed video to its original * @property {number} original The ID of the original video. * @property {string} start Time stamp of start time of new video. Example '00:01:02.345'. * @property {string} end Time stamp of end time of new video. Example '00:02:00'. */ /** * Attachment object. * * @typedef {Attachment} Attachment * @property {string|null} baseColor Attachment base color. * @property {string|null} blurHash Attachment blur hash. * @property {string} [type] Attachment type, e.g. video or image. * @property {string} mimeType The MIME type. * @property {string|null} creationDate When the attachment was created. * @property {string} src The source URL. * @property {number} width The natural resource width. * @property {number} height The natural resource height. * @property {string|null} poster The poster URL for the "video" type. * @property {number|null} posterId The system poster ID. * @property {number|null} id The system ID. * @property {number|null} length The length for the "video" type. * @property {string|null} lengthFormatted The formatted length for the "video" type. * @property {string|null} alt The user-readable accessibility label for the resource. * @property {boolean} local Whether the resource has been already uploaded to the server. * @property {boolean} isOptimized Whether the resource has already been optimized. * @property {boolean|null} isMuted Whether the resource has already been muted. * @property {boolean|null} isExternal Whether the resource is externally hosted. * @property {boolean|null} isPlaceholder Whether the resource is a placeholder. * @property {Object} sizes Object of image sizes. * @property {?Object} output An optional object of video sizes for rendering gifs as videos. * @property {?TrimData} trimData An optional object of video trim data. * @property {boolean} needsProxy Whether the resource needs a CORS proxy. */ /** * ResourceSize object * * @typedef {ResourceSize} ResourceSize * @property {number} width The width of the ResourceSize. * @property {number} height The height of the ResourceSize. * @property {string} sourceUrl The URL pointing to the resource for this size. * @property {string|null} mimeType The mimeType of this ResourceSize. */ /** * Resource object. * * @typedef {Resource} Resource * @property {string|null} baseColor An optional attribution to detect the base color of a resource (an image or video). Value looks like #ff00ff. * @property {string|null} blurHash An optional attribution to detect the blurhash of a resource (an image or video). * @property {string|null} type Resource type. Currently only "image" and "video" values are allowed. If not specified, will be calculated from the mime-type. * @property {string} mimeType The MIME type. * @property {string|null} creationDate When resource was created. * @property {string} src The source URL. * @property {number} width The natural resource width. * @property {number} height The natural resource height. * @property {string|null} poster The poster URL for the "video" type. * @property {number|null} posterId The system poster ID. * @property {number|null} id The system ID. * @property {number|null} length The length for the "video" type. * @property {string|null} lengthFormatted The formatted length for the "video" type. * @property {string|null} alt The user-readable accessibility label for the resource. * @property {boolean} local Whether the resource has been already uploaded to the server. * @property {boolean} isOptimized Whether the resource has already been optimized. * @property {boolean} isMuted Whether the resource has already been muted. * @property {boolean} isExternal Whether the resource is externally hosted. * @property {boolean} isPlaceholder Whether the resource is a placeholder. * @property {Object.<string, ResourceSize>} sizes Object of image sizes. * @property {Attribution|null} attribution An optional attribution for the resource. * @property {?Object} output An optional object of video sizes for rendering gifs as videos * @property {?TrimData} trimData An optional object of video trim data. * @property {boolean} needsProxy Whether the resource needs a CORS proxy. */ //# sourceMappingURL=propTypes.d.ts.map