Skip to main content

Brightcove

The brightcove module lets editors search and import videos from a Brightcove Video Cloud account through Brightspot's federated search, and can incrementally import new and updated videos on a schedule.

Dependencies

Depends on db-http and the Brightcove CMS API v1 (cms.api.brightcove.com), authenticated with an OAuth2 client-credentials token from oauth.brightcove.com.

Installation

<!-- Requires Brightspot 5.0 or later. -->
<dependency>
<groupId>com.brightspot.dbhttp</groupId>
<artifactId>brightcove</artifactId>
<version>1.0.0</version>
</dependency>

API reference

com.psddev.brightcove.BrightcoveDatabase

Extends HttpDatabase. Builds a Brightcove CMS query string from the editor's keywords and an update-date range filter, and caches both search results and individual video lookups for five minutes to reduce API calls. Detail lookups are batched in groups of up to 10 video Ids, matching a limit in Brightcove's API.

com.psddev.brightcove.BrightcoveVideoExternalItem

Extends ExternalItem, displayed as Brightcove Video.

FieldTypeDescription
previewUrlStringA Brightcove Player embed URL used to preview the video in the CMS.
brightcoveVideoBrightcoveVideoThe embedded Brightcove video metadata (see below).
updateDateDateWhen the video was last updated in Brightcove. Filterable in search.

com.psddev.brightcove.BrightcoveVideo mirrors the Brightcove CMS API's video object, including brightcoveId, brightcoveName, description, longDescription, tags, customFields, cuePoints, duration, brightcoveState (ACTIVE/INACTIVE), publishedAt, createdAt, updatedAt, schedule, textTracks, folderId, sharing, and Brightspot-only poster/thumbnail (StorageItem).

Configuration

Each Brightcove account is configured as a com.psddev.brightcove.BrightcoveSettings record (accountId, playerId, clientId, clientSecret, taskHostName, importEnabled, fullImportEnabled, debugEnabled), collected into a Set<BrightcoveSettings> on BrightcoveSiteSettingsModification, shown under Site Settings > Integrations > Brightcove. A site can configure multiple Brightcove accounts.

note

When importEnabled is on, BrightcoveImportTask periodically imports new and updated videos in the background rather than waiting for an editor to search for them. taskHostName designates which application host runs the import so it doesn't run redundantly on every instance.

The Brightcove Player script is injected into the CMS automatically so imported videos preview inline using the account's configured playerId.

Extending the plugin

The module doesn't ship a content type for imported videos, and supports extension in both directions:

  • Import. Extend AbstractBrightcoveVideoImporter<T> and implement doImport to map a Brightcove video into a local content type, for use with scheduled import. Call setInitiatedByImport before saving so beforeSave/afterSave hooks can detect that the update came from an import.
  • Export. Extend AbstractBrightcoveVideoExporter<T> and implement doExport to push a local content object's changes back to Brightcove.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.