Adding Pipeline and Preset Group Options
Adding pipeline and preset group options to media content types enable editorial users to override default pipeline and preset group settings for individual content items.
A pipeline/preset group selection option is a field
element that:
-
Has
mime-type
set totext/plain
-
Has a child
pipeline
orpreset-group
element that belongs to the namespacehttp://xmlns.escenic.com/2013/media
and has the attributeenabled ="true"
A minimal pipeline option field definition, in other words, would look like this:
<field name="pipeline" type="basic" mime-type="text/plain"> <ui:label>Pipeline</ui:label> <pipeline xmlns="http://xmlns.escenic.com/2013/media" enabled="true"/> </field>
In practice, however, such a field definition would require CUE users to know the names of the available pipelines and enter them correctly. The preferred method is to use a collection field. A collection field can be configured to get all currently defined pipeline names from an Atom feed provided by the Video plug-in. The retrieved names are then offered as suggestions when the user starts typing. Here is an example of the recommended way to define a pipeline option field:
<field name="pipeline" type="collection" mime-type="text/plain" src="escenic/video/config/pipelines" select="content"> <ui:label>Pipeline</ui:label> <pipeline xmlns="http://xmlns.escenic.com/2013/media" enabled="true"/> </field>
The src
attribute contains the path of the
Video
plug-in's pipeline Atom feed and must be set to
escenic/video/config/pipelines
. The
select
attribute must be set to
content
.
A preset group option field can be created in exactly the same way:
<field name="preset" type="collection" mime-type="text/plain" src="escenic/video/config/presets/video" select="content"> <ui:label>Preset Group</ui:label> <preset-group xmlns="http://xmlns.escenic.com/2013/media" enabled="true"/> </field>
For video preset groups the field
element's
src
attribute must be set to
escenic/video/config/presets/video
, while for audio
preset groups, it must be set to
escenic/video/config/presets/audio
:
<field name="preset" type="collection" mime-type="text/plain" src="escenic/video/config/presets/audio" select="content"> <ui:label>Preset Group</ui:label> <preset-group xmlns="http://xmlns.escenic.com/2013/media" enabled="true"/> </field>
For a detailed description of how collection fields work, see Collection Fields.