Defining an Internal Audio Content Type
A internal audio content type must at least have the following:
-
A
media
child element belonging to the namespacehttp://xmlns.escenic.com/2013/media
. This element must have atype
attribute set toaudio
, thereby identifying the content type as an audio content type managed by the Video plug-in. -
A parameter called
com.escenic.article.staging
set tofalse
, which specifies that content item staging must be disabled for this content type. If content item staging is disabled generally at your installation or for the whole publication, then you can omit this parameter. -
A
link
field
for holding a link to a locally stored audio file. Thelink
element must have a childrelation
element containing the valuecom.escenic.edit-media
. -
A
basic
field with:-
mime-type
set toapplication/json
-
an
audio
child element with anenabled
attribute set totrue
. This element must belong to the namespacehttp://xmlns.escenic.com/2013/audio
. -
a
ui:hidden
element which prevents it from being displayed in CUE.
-
-
A decorator called
audioArticleDecorator
The following example shows such a minimal
content-type
:
<content-type name="internal-audio"> <media xmlns="http://xmlns.escenic.com/2013/media" type="audio"/> <parameter name="com.escenic.article.staging" value="false"/> <ui:icon>graphic</ui:icon> <ui:label>Internal audio</ui:label> <ui:title-field>title</ui:title-field> <ui:decorator name="audioArticleDecorator"/> <panel name="main"> <field name="title" type="basic" mime-type="text/plain"/> <field name="binary" type="link"> <relation>com.escenic.edit-media</relation> </field> <field name="audio" type="basic" mime-type="application/json"> <audio xmlns="http://xmlns.escenic.com/2013/audio" enabled="true"/> </field> </panel> </content-type>
When a new content item of this type is created in CUE, the user is
required to upload a suitable file to the link
field. You can use a constraints
element to limit
the file types it is possible to upload. For example:
<field name="binary" type="link"> <constraints> <mime-type>audio/mp3</mime-type> <mime-type>audio/mp4</mime-type> </constraints> </field>
A real internal audio content type will of course usually contain other fields and elements too - see the expanded example in Defining an AWS (Internal) Video Content Type.