ignite-payload-plugin
v2.1.0
Published
Ignite Video Cloud plugin for Payload CMS
Downloads
694
Maintainers
Readme
ignite-payload-plugin
Ignite Video Cloud plugin for Payload CMS. This plugin provides a ready to use field for Payload CMS, to fetch video data from Ignite Video Cloud.
Installation
npm install ignite-payload-plugin
yarn add ignite-payload-plugin
Plugin Integration
Import and insert the plugin into the Payload config
import { igniteVideo } from 'ignite-payload-plugin'
export default buildConfig({
plugins: [
igniteVideo({
authToken: '[YOUR-IGNITE-API-TOKEN]',
}),
],
})
Plugin properties / paramenters
authToken
(string)
your Ignite Video Cloud API access token. Can be found under "API Integrations" in your Ignite admin UI
enabled
(boolean)
(optional) Defines if the plugin is enabled. (Default: true)
igniteUrl
(string)
(optional)your Ignite Video Cloud API URL. For all accounts, except for enterprise accounts this is https://app.ignitevideo.cloud
Field Integration
Import and insert the field component
import { igniteVideoSelect } from 'ignite-payload-plugin'
const Pages: CollectionConfig = {
slug: 'pages',
fields: [
{
...other fields...
},
igniteVideoSelect({
name: '[FIELD-NAME]'
}),
{
...other fields...
},
],
}
Field properties / paramenters
name
(string)
the name of your video field in payload
show
('public' | 'private' | 'all')
(optional) Defines the visibility status of the videos to show in the selection (Default: "public")
allowUpload
(boolean)
(optional) Defines if the user is allowed to upload videos directly from the field. If set to true, a upload button will be visible in the field. Your API token needs to have the necessary permissions to create videos in your Ignite account. (Default: false)
If you have set categories
or tags
, these will be assinged to uploaded videos via the plugin.
label
(string)
(optional) Overwrites the default field label (Default: "Select video")
required
(boolean)
(optional) Sets payload default field required attribute. (Default: false)
categories
(string[] of category slugs)
(optional) Can be set to query the API for specific categories only. Categories provided in this array have an OR relationship.
tags
(string[] of tag slugs)
(optional) Can be set to query the API for specific tags only. Tags provided in this array have an OR relationship.
admin
(GroupField["admin"])
(optional) Can be set to override the admin settings for the root field (group field).
Example field config
igniteVideoSelect({
name: 'hoverVideo',
label: 'Choose the hover video',
allowUpload: true,
required: true,
categories: ['website', 'app'],
tags: ['loops', 'muted']
})