Skip to main content

Vimeo

The vimeo module lets editors search and import videos from Vimeo through Brightspot's federated search.

Dependencies

Depends on db-http and the Vimeo API v3.4 (api.vimeo.com), authenticated with an OAuth2 client-credentials token.

Installation

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

API reference

com.psddev.vimeo.VimeoDatabase

Extends HttpDatabase. With no keyword, browses Vimeo's staff picks channel; with a keyword, searches Vimeo filtered by content rating. Search results and video metadata are cached in memory to reduce API calls and avoid rate limits.

com.psddev.vimeo.VimeoVideo

Extends ExternalItem.

FieldTypeDescription
vimeoIdStringThe Vimeo video Id.
previewUrlStringAn embed URL used to preview the video in the CMS.
ratingSelectionVimeoRatingSelectionThe content rating filter applied to the search that found this video (safe or all).
videoTitleStringThe video title.
videoLinkStringA link to the video on Vimeo.
descriptionStringThe video description.
resolutionStringThe video resolution, formatted as WIDTHxHEIGHT.
contentRatingStringThe video's content rating from Vimeo.
durationStringThe formatted video duration.
publishDateDateWhen the video was published on Vimeo.

Sort order is set through the VimeoVideoSort enum, covering plays, alphabetical (ascending or descending), and duration (ascending or descending).

Configuration

Credentials are stored on VimeoSettings, a Modification<CmsTool> shown under Site Settings > Integrations > Vimeo (apiKey, apiSecret, and a requestBatchSize limited to 10, 25, 50, or 100). The module exchanges the API key and secret for an OAuth2 token automatically and caches it for 24 hours, since Vimeo doesn't document a token lifetime.

Extending the plugin

The module doesn't ship a content type for imported videos. To let editors create one from search results, define a content type and extend ExternalItemConverter<VimeoVideo, T> to convert the external item into it on import. VimeoVideo#getPlayerAppId returns the value needed to construct a player embed URL for the front end.

Was this page helpful?

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