Platform Explorer / Nuxeo Platform 5.6

Component org.nuxeo.ecm.platform.video.layouts

Services

Extension points

Contributions

XML source

<?xml version="1.0" encoding="UTF-8"?>
<component name="org.nuxeo.ecm.platform.video.layouts">

  <require>org.nuxeo.ecm.platform.forms.layouts.webapp.summary</require>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="widgettypes">
    <widgetType name="video_player">
      <documentation>
        This widget displays a HTML5 video player for browsers
        supporting it, and fallback on a Flash player for others.
        It uses the WebM or MP4 conversion (in 480p) of
        a document having the facet 'Video'.
      </documentation>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/video_player_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="video_storyboard">
      <documentation>
        This widget displays the story board of
        a document having the facet 'Video'.
      </documentation>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/video_storyboard_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="video_conversions">
      <documentation>
        This widget displays the list of available
        video conversions for the given Video document.
      </documentation>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/video_conversions_widget_template.xhtml
      </property>
    </widgetType>

    <widgetType name="video_info">
      <documentation>
        This widget displays the information of the main video of
        a document having the facet 'Video'.
      </documentation>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/video_info_widget_template.xhtml
      </property>
    </widgetType>
  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="widgets">
    <widget name="summary_video_player" type="video_player">
      <properties widgetMode="any">
        <property name="width">550</property>
        <property name="height">310</property>
      </properties>
    </widget>
    <widget name="summary_video_storyboard" type="video_storyboard">
      <labels>
        <label mode="any">heading.storyboard</label>
      </labels>
      <translated>true</translated>
    </widget>
    <widget name="summary_video_conversions" type="video_conversions" />
    <widget name="summary_video_info" type="video_info" />

    <widget name="video_info_duration" type="text">
      <labels>
        <label mode="any">label.widget.video.duration</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>vid:info/duration</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="video_info_width" type="int">
      <labels>
        <label mode="any">label.widget.video.width</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>vid:info/width</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="video_info_height" type="int">
      <labels>
        <label mode="any">label.widget.video.height</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>vid:info/height</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="video_info_format" type="text">
      <labels>
        <label mode="any">label.widget.video.format</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>vid:info/format</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="video_info_frameRate" type="text">
      <labels>
        <label mode="any">label.widget.video.frameRate</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>vid:info/frameRate</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="video_info_streams" type="list">
      <labels>
        <label mode="any">label.widget.video.streams</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>vid:info/streams</field>
      </fields>
      <properties widgetMode="edit">
        <property name="required">true</property>
      </properties>
      <subWidgets>
        <widget name="listItem" type="text">
          <fields>
            <field>streamInfo</field>
          </fields>
          <labels>
            <label mode="any"></label>
          </labels>
          <widgetModes>
            <mode value="any">view</mode>
          </widgetModes>
        </widget>
      </subWidgets>
    </widget>
  </extension>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="actions">

    <action id="summary_video_player" type="widget" order="50">
      <category>SUMMARY_PANEL_LEFT</category>
      <properties>
        <property name="widgetName">summary_video_player</property>
      </properties>
      <filter-id>hasVideo</filter-id>
    </action>

    <action id="summary_current_document_view">
      <filter-id>notHasVideo</filter-id>
    </action>

    <action id="summary_video_conversions" type="widget" order="300">
      <category>SUMMARY_PANEL_LEFT</category>
      <properties>
        <property name="widgetName">summary_video_conversions</property>
      </properties>
      <filter-id>hasVideo</filter-id>
    </action>

    <action id="summary_video_storyboard" type="widget" order="340">
      <category>SUMMARY_PANEL_RIGHT</category>
      <properties>
        <property name="widgetName">summary_video_storyboard</property>
      </properties>
      <filter-id>hasVideo</filter-id>
    </action>

    <action id="summary_video_info" type="widget" order="350">
      <category>SUMMARY_PANEL_RIGHT</category>
      <properties>
        <property name="widgetName">summary_video_info</property>
      </properties>
      <filter-id>hasVideo</filter-id>
    </action>

  </extension>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="filters">

    <filter id="hasVideo">
      <rule grant="true">
        <schema>video</schema>
      </rule>
    </filter>

    <filter id="notHasVideo">
      <rule grant="false">
        <schema>video</schema>
      </rule>
    </filter>

  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="layouts">

    <!-- deprecated since 5.6, here for comat -->
    <layout name="video_summary_layout">
      <templates>
        <template mode="any">/layouts/layout_summary_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>summary_video_player</widget>
          <widget>summary_current_document_files</widget>
          <widget>summary_video_conversions</widget>
          <widget>summary_current_document_comments</widget>
        </row>
        <row>
          <widget>summary_current_document_description</widget>
          <widget>summary_current_document_states</widget>
          <widget>summary_current_document_contributors</widget>
          <widget>summary_video_storyboard</widget>
          <widget>summary_video_info</widget>
          <widget>summary_current_document_tagging</widget>
          <widget>summary_current_document_relations</widget>
        </row>
        <row>
          <widget>summary_current_document_publications</widget>
        </row>
        <row>
          <widget>summary_current_document_single_tasks</widget>
        </row>
      </rows>
    </layout>

    <layout name="video_info">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>video_info_format</widget>
        </row>
        <row>
          <widget>video_info_duration</widget>
        </row>
        <row>
          <widget>video_info_width</widget>
        </row>
        <row>
          <widget>video_info_height</widget>
        </row>
        <row>
          <widget>video_info_frameRate</widget>
        </row>
      </rows>
    </layout>
  </extension>

</component>

Documentation