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
- Maven
- Gradle
- Gradle (Kotlin DSL)
<!-- Requires Brightspot 5.0 or later. -->
<dependency>
<groupId>com.brightspot.dbhttp</groupId>
<artifactId>vimeo</artifactId>
<version>1.0.0</version>
</dependency>
// Requires Brightspot 5.0 or later.
implementation 'com.brightspot.dbhttp:vimeo:1.0.0'
// Requires Brightspot 5.0 or later.
implementation("com.brightspot.dbhttp:vimeo:1.0.0")
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.
| Field | Type | Description |
|---|---|---|
vimeoId | String | The Vimeo video Id. |
previewUrl | String | An embed URL used to preview the video in the CMS. |
ratingSelection | VimeoRatingSelection | The content rating filter applied to the search that found this video (safe or all). |
videoTitle | String | The video title. |
videoLink | String | A link to the video on Vimeo. |
description | String | The video description. |
resolution | String | The video resolution, formatted as WIDTHxHEIGHT. |
contentRating | String | The video's content rating from Vimeo. |
duration | String | The formatted video duration. |
publishDate | Date | When 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.