1.0.2 • Published 4 years ago

@coveops/vimeo-thumbnail v1.0.2

Weekly downloads
33
License
Apache-2.0
Repository
-
Last release
4 years ago

VimeoThumbnail

Vimeo Thumbnail with its own modal preview box

Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.

Getting Started

  1. Install the component into your project.
npm i @coveops/vimeo-thumbnail
  1. Use the Component or extend it

Typescript:

import { VimeoThumbnail, IVimeoThumbnailOptions } from '@coveops/vimeo-thumbnail';

Javascript

const VimeoThumbnail = require('@coveops/vimeo-thumbnail').VimeoThumbnail;
  1. You can also expose the component alongside other components being built in your project.
export * from '@coveops/vimeo-thumbnail'
  1. Include the component in your template as follows:

Place the component in your markup:

<div class="CoveoVimeoThumbnail"></div>

Extending

Extending the component can be done as follows:

import { VimeoThumbnail, IVimeoThumbnailOptions } from "@coveops/vimeo-thumbnail";

export interface IExtendedVimeoThumbnailOptions extends IVimeoThumbnailOptions {}

export class ExtendedVimeoThumbnail extends VimeoThumbnail {}

Options

The following options can be configured:

OptionRequiredTypeDefaultNotes
widthNostring220pxWidth of the thumbnail
heightNostring112pxHeight of the thumbnail
embedNobooleantrueSpecifies whether clicking on the Vimeo thumbnail loads the video in a modal box
fieldThumbnailNostringytthumbnailurlField containing the location of the thumbnail image
fieldVideoIdNostringuriField containing the ID of the video like: https://vimeo.com/85905904

Contribute

  1. Clone the project
  2. Copy .env.dist to .env and update the COVEO_ORG_ID and COVEO_TOKEN fields in the .env file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.
  3. Build the code base: npm run build
  4. Serve the sandbox for live development npm run serve