import type Input from "./Input.js"; import type { InputMethod } from "../../../../portal/jsonTypes.js"; /** @since 5.1 */ export interface VideoInputProperties extends Partial> {} /** * The `VideoInput` class defines a user interface for an input to which a video file can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate` and is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/). * * > [!CAUTION] * > * > * Input methods that are configured as only allowing `capture` are not supported. * > * Minimum input requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one. * > * When using specific input types, such as `VideoInput`, existing attachments are displayed only if they match the element's [keyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword). Existing attachments without a matching keyword are not shown. To display attachments that do not have a corresponding keyword, use the general [AttachmentInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/) instead. This input type provides a more general approach to displaying attachments and does not require a keyword to be specified by setting the [attachmentAssociationType](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/#attachmentAssociationType) accordingly. * * @since 5.1 * @see [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/) * @example * // Creates a new VideoInput for an attachment element within a form * const videoInput = new VideoInput({ * inputMethod: "upload", * maxDuration: 90 * }); */ export default class VideoInput extends Input { /** @since 5.1 */ constructor(properties?: VideoInputProperties); /** * The supported input methods used to attach a video. * * @default "any" * @since 5.1 */ accessor inputMethod: InputMethod; /** * Defines the maximum length of an attachment for this element in seconds. If not specified, there is no maximum length. * * @since 5.1 */ accessor maxDuration: number | null | undefined; /** * The input type identifier. * * @since 5.1 */ get type(): "video"; }