Interface CogsPluginManifestJson

cogs-plugin-manifest.json is a JSON manifest file describing the content of a COGS plugin or COGS Media Master custom content.

It should be saved in the root of a folder in the plugins or client_content folder in your COGS project

The COGS plugins directory contains a number of plugins you can use out of the box

interface CogsPluginManifestJson {
    config?: PluginManifestConfigJson[];
    description?: string;
    events?: {
        fromCogs?: PluginManifestEventJson[];
        toCogs?: PluginManifestEventJson[];
    };
    icon?: string;
    indexPath?: string;
    media?: {
        audio?: true;
        images?: true;
        video?: true;
    };
    minCogsVersion?: `${number}.${number}.${number}`;
    name: string;
    state?: PluginManifestStateJson[];
    store?: {
        items?: {
            [key: string]: {
                persistValue?: boolean;
            };
        };
    };
    version: `${number}` | `${number}.${number}` | `${number}.${number}.${number}`;
    window?: {
        height: number;
        visible?: boolean;
        width: number;
    };
}

Properties

description?: string

A description that appears alongside name in the list of plugins, and in the COGS plugins directory

events?: {
    fromCogs?: PluginManifestEventJson[];
    toCogs?: PluginManifestEventJson[];
}

Events that trigger COGS behaviors or can trigger actions in this plugin

Type declaration

icon?: string

An icon shown alongside name, in the COGS navigation bar, and in the COGS plugins directory

The icon can be either:

  • A FontAwesome 5 icon
  • The relative path to an image in your plugin folder (Requires COGS 4.13 or later)
    • Must start with ./
    • Alpha channel is used as a mask
indexPath?: string

The HTML entrypoint for the plugin

Defaults to / which includes /index.html

media?: {
    audio?: true;
    images?: true;
    video?: true;
}

The types of COGS media actions supported

Type declaration

  • Optional audio?: true
  • Optional images?: true
  • Optional video?: true
minCogsVersion?: `${number}.${number}.${number}`

The minimum COGS version required

Follows semantic versioning with semver e.g. `4.12.0

name: string

A short human-readable name

State that can be set by COGS behaviors

store?: {
    items?: {
        [key: string]: {
            persistValue?: boolean;
        };
    };
}

COGS-managed key/value data store settings

Allows certain key/value pairs to be saved to disk in the project folder alongside the plugin. Any key that is not listed here can still be used.

Type declaration

  • Optional items?: {
        [key: string]: {
            persistValue?: boolean;
        };
    }
    • [key: string]: {
          persistValue?: boolean;
      }
      • Optional persistValue?: boolean

        When true saves this key/value pair to the project folder when the value changes and restores the value when the project is next loaded.

        This option is only available for COGS plugins, not for custom Media Master content.

version: `${number}` | `${number}.${number}` | `${number}.${number}.${number}`

e.g. 1.0.0

window?: {
    height: number;
    visible?: boolean;
    width: number;
}

If set, shows a popup window to the user where you can show the HTML content of your plugin

By default a window is not shown to the user The window can later be opened/closed from the Javascript running in the plugin Only valid for plugins, not for Media Master custom content

Type declaration

  • height: number
  • Optional visible?: boolean

    Whether the window is initially visible

  • width: number

Generated using TypeDoc