Define a video field within a document, object, image or file definition fields array.
This function will narrow the schema type down to video fields and options based on the provided
type-string.
Using defineVideoField is optional, but should provide improved autocompletion in your IDE, when building your schema.
Video field-properties like validation and initialValue will also be more specific.
Note: This video field type is designed to work specifically with the Media Library asset source.
Make sure you have the Media Library is enabled in your studio via sanity.config.ts.
Define a video field within a document, object, image or file definition
fieldsarray.This function will narrow the schema type down to video fields and options based on the provided type-string.
Using
defineVideoFieldis optional, but should provide improved autocompletion in your IDE, when building your schema. Video field-properties likevalidationandinitialValuewill also be more specific.Note: This video field type is designed to work specifically with the Media Library asset source. Make sure you have the Media Library is enabled in your studio via sanity.config.ts.
See defineType for similar examples.