Skip to main content

Exporting

You can export any Clip’s definition in two formats:

  • The “portable” format
  • The “live” format

The difference between the two formats is that the “live” format stores references to Classes while the portable format has absolutely no reference to real Classes or objects but rather it stores the Clip’s information strictly on a (portable) json that has only strings on it.

The “live” format

You can get the “live” export of any Clip (or any other Incident) via the “exportLiveDefinition” method provided by all Incidents, Groups or Clips. This method returns a json that has the following structure:

{
Class: <The Class of the Incident>,
attrs: <the attrs of the Incident>,
props: <the props of the Incident>,
incidents: { // this exists only in the case of a Group or a Clip
id: <the id of the Incident>,
position: <the position of the Incident on its parent\'s timeline>,
leaf: <a completely similar structure as the one defined>
}
}

The “portable” format

The portable format only stores text information on it. In order to get the portable / text representation of any Clip (or any other Incident) just use the “exportDefinition” method provided by all Incidents, Groups or Clips. The method returns a json that has the following structure:

{
ClassName: <the name of the Incident’s Class>,
plugin_npm_name: <the plugin_npm_name of the Incident’s plugin>,
version: <the version number of the plugin>,
attrs: <the attrs of the Incident>,
props: <the props of the Incident>,
incidents: {
id: <the id of the Incident>,
position> <the position of the Incident on its parent’s timeline>,
leaf: <a completely similar structure as the one defined>
}
}