MediaSchemaclass

new MediaSchema({ one = "media", title = "Media", types = MEDIA_TYPES, capture, ...options }: MediaSchemaOptions)
ParamType
optionsMediaSchemaOptions
Allowed options for MediaSchema. required
    .captureFileCapture
Which camera a file picker for this schema opens straight away, or undefined for the normal picker. readonly
Return
MediaSchema
Schema that validates the file name of an image or a video.
PropertyType
.captureFileCapture
Which camera a file picker for this schema opens straight away, or undefined for the normal picker. readonly

Schema that validates the file name of an image or a video.

  • The extension must be one of types (default MEDIA_TYPES).
  • capture tells a file picker to open the camera straight away.