export const videoSet: IObjectType = {
name: 'muxVideoSet',
title: 'Mux Video Set',
type: 'object',
fields: [
{
name: 'language',
title: 'Language',
type: 'string',
validation: (Rule: IRuleType): IRuleType => Rule.required(),
},
{
title: 'Video',
name: 'muxVideo',
type: 'muxVideo',
},
],
};
const video: IDocument = {
name: documentType,
title: 'Video Set Document',
type: 'document',
icon: () => getDocumentIcon('videoSet'),
fields: [
{
title: 'Title',
name: 'title',
type: 'string',
},
{
name: 'localeIdentifier',
title: 'Locale Identifier',
type: 'reference',
to: [{ type: 'localeIdentifier' }],
options: {
filter: regionMasterPrimaryLanguageFilter,
},
validation: (Rule: IRuleType): IRuleType => Rule.required(),
},
{
name: 'tags',
title: 'Tags',
description: 'Freetext tag to help find the video.',
type: 'array',
options: {
layout: 'tags',
editModal: 'popover',
},
of: [{ type: 'string' }],
},
{
title: 'Language Specific Videos',
name: 'languageSpecificVideos',
type: 'array',
of: [{ type: 'videoSet' }],
inputComponent: VideoSet,
},
],
preview: {
select: {
title: 'title',
},
},
};
export default video;