Nuxeo Add-Ons

Nuxeo Media Publishing

Updated: December 5, 2017 Page Information Edit on GitHub

Nuxeo Media Publishing is an addon that enables users to publish video documents stored in the Nuxeo repository to external video hosting websites, without leaving the Nuxeo Platform UI.

This addon is designed to allow many implementations. Default implemented providers are:

Functional Overview

Installing this addon enriches the Publish tab of a video document with a set of external providers to where videos can be published. When publishing a video, users must select a publishing account and each provider can require additional fields to be filled (e.g tags, privacy of the video).

This addon also adds a new section in the Summary page which lists all the providers available and the respective status of the video (either “Published” or “Not published”). Once a video is published, additional informations are displayed, such as:

  • The URL to the video in the external video host
  • An embeddable HTML snippet
  • Statistics

Published videos can also be republished or unpublished from the external provider.

Installation and Configuration

This addon requires no specific installation steps. It can be installed like any other package from the Marketplace or from the Admin tab. However, it requires the installation of the Digital Asset Management (DAM) addon which provides multimedia files (picture, audio and video).

After the package is installed, two new OAuth2 service providers are added to Nuxeo (Admin > Cloud Services > Service providers). These providers must be properly configured before users can use them to publish their videos.

YouTube Configuration

Step 1: Preparing your application accounts on the Google Developers Console

  1. Go to https://console.developers.google.com/project.

  2. Create a new project.

  3. Enable YouTube API: On the API Manager, click on YouTube Data API and then on the Enable button.

  4. Create a new OAuth Client ID: In Credentials, click on Create Credentials.

    a. Choose OAuth Client ID.

    b. If not already done, you will need to edit your consent screen: In Credentials > OAuth Consent Screen, fill the product name (the name of your application). Optionally, you may fill the other fields.

    c. Choose Web Application.

    d. For Authorized JavaScript origins set the URL of your server. Ex http://localhost:8080

    e. For Authorized redirect URIs set the following URL, adapting the hostname and port to your case: http://NUXEO_SERVER/nuxeo/site/oauth2/YouTube/callback.

Step 2: Configuring the Nuxeo Platform

  1. In the Admin tab, go to Cloud Services > Service providers.

  2. In the OAuth2 Service providers section, update the service whose name is “YouTube” by clicking on the Modify button.

  3. Set the Client ID and Client Secret values with the one you got on the previous step.

  4. Make sure the Enabled box is checked.

  5. Save.

Wistia Configuration

OAuth2 is not yet available for all Wistia accounts. Until it is, contact Wistia support to get it enabled.

Step 1: Preparing your Wistia OAuth application

  1. Go to Wistia website > Account > Settings > OAuth applications.

  2. Create a new application.

  3. Fill in the required fields.

    a. For Callback URL set the following URL, adapting the hostname and port to your case: http://NUXEO_SERVER/nuxeo/site/oauth2/Wistia/callback.

    b. Set permissions to all:all.

  4. Open the details of the application to get the Client ID and Client Secret values. You will need them in the next steps.

Step 2: Configuring the Nuxeo Platform

  1. In the Admin tab, go to Cloud Services > Service providers.

  2. In the OAuth2 Service providers section, update the service whose name is “Wistia” by clicking on the Modify button.

  3. Set the Client ID and Client Secret values with the one you got on the previous step.

  4. Make sure the Enabled box is checked.

  5. Save.

How to Add Publishing Accounts

After setting up the OAuth service providers, users must add new accounts that are used to publish and retrieve video’s informations from the external providers. To do so, users must go to Home > Cloud Services and use the available buttons to add their service accounts.

Technical Overview

This section explains what is included in the Nuxeo Media Publishing addon.

Schemas

Nuxeo Media Publishing defines the following schema:

  • publishable_media: used to store a list of providers where the video is published.

Facets

This addon defines the PublishableMedia facet. This facet is added to the Video document type and contains the publishable_media schema.

Extension Points

The MediaPublishingService exposes the providers extension point to contribute new publishing services.

<extension-point name="providers" target="org.nuxeo.ecm.media.publishing.MediaPublishingService">
  <provider id="MyMediaPublishingProvider"
      enabled="true"
      service="org.nuxeo.ecm.media.publishing.MyMediaPublishingProviderService">
  </provider>
</extension-point>

How to Contribute New Providers

If you want to define other media publishing providers, you need to contribute a new publishing service to the Nuxeo Media Publishing addon.

Step 1: Contribute a media publishing service

Nested in the component tag of your XML contribution file, set the implementation class and use the extension point providers to register your media publishing service.

<component name="org.nuxeo.ecm.media.publishing.MyMediaPublishingProviderService">
  <implementation class="org.nuxeo.ecm.media.publishing.MyMediaPublishingProviderService" />

  <service>
    <provide interface="org.nuxeo.ecm.media.publishing.MyMediaPublishingProviderService" />
  </service>

  <extension target="org.nuxeo.ecm.media.publishing.MediaPublishingService"point="providers">
    <provider id="my-publishing-provider" 
        enabled="true"
        service="org.nuxeo.ecm.media.publishing.MyMediaPublishingProviderService"/>
  </extension>
</component>

Your service implementation must implement the MediaPublishingProvider interface or extend any other class that implements this interface.

Step 2: Contribute an OAuth provider

  1. Nested in the component tag of your XML contribution file, add a require tag the OAuth2ServiceProviderRegistry.
  2. Then, use the extension point providers of the OAuth2ServiceProviderRegistry service to register the OAuth provider.

    <component name="org.nuxeo.ecm.media.publishing.MyOAuthServiceProvider">
      <require>org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistry</require>
    
      <extension target="org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistry" point="providers">
        <provider>
          <name>my-publishing-provider</name>
          <description>MyOAuthServiceProvider</description>
          <class>org.nuxeo.ecm.media.publishing.MyOAuthServiceProvider</class>
          <tokenServerURL></tokenServerURL>
          <authorizationServerURL></authorizationServerURL>
          <scope></scope>
        </provider>
      </extension>
    </component>
    

Note: The name field of your OAuth provider must match the id of your media publishing service defined in Step 1. The description field is used as a label in the UI.

Step 3: Contribute options widgets (optional)

By default, when publishing a video, the only required field to fill in is the publishing account. However, since different services allow different metadata (e.g. privacy status of a video, channels, projects, tags) it is possible to contribute more options widgets to the publishing panel in the UI.

<extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions">
  <action id="myprovider_options" type="widget">
    <category>MEDIA_PUBLISHING_OPTIONS_CATEGORY</category>
    <properties>
      <property name="widgetName">myprovider_options_widget</property>
    </properties>
    <filter id="isMyProvider">
      <rule grant="true">
        <condition>#{provider == "my-publishing-provider"}</condition>
      </rule>
    </filter>
  </action>
</extension>

7 days ago Manon Lumeau add tags for doc days
a month ago manonlumeau Added content-review-lts2017 label
2 months ago manonlumeau NXDOC-1346-FT review screenshot
a year ago Manon Lumeau 19
2 years ago Vincent Dutat 18
2 years ago Vincent Dutat 17
2 years ago Vincent Dutat 16
2 years ago Manon Lumeau 15
2 years ago Andre Justo 14
2 years ago Andre Justo 13
2 years ago Solen Guitter 12
2 years ago Solen Guitter 11 | add link
2 years ago Manon Lumeau 9
2 years ago Manon Lumeau 10
2 years ago Manon Lumeau 8
2 years ago Manon Lumeau 7
2 years ago Manon Lumeau 6
2 years ago Manon Lumeau 5
2 years ago Manon Lumeau 4
2 years ago Andre Justo 3
2 years ago Andre Justo 2
2 years ago Andre Justo 1
History: Created by Andre Justo