colby-wp-react-vimeo-player

1.0.4 • Public • Published

colby-wp-react-vimeo-player

A WordPress shortcode for displaying an autoresizing, lazyloading Vimeo video.

Install

npm install --save https://github.com/ColbyCommunications/colby-wp-react-vimeo-player

Usage

Javascript

Simply import the package into your project:

import 'colby-wp-react-vimeo-player';

WordPress

Import this package's index.php:

require_once('node_modules/colby-wp-react-vimeo-player/index.php');

Use the shortcode:

[colby-vimeo-player id="THE_VIMEO_ID"]

Shortcode atts:

Name Description Default
id (required) A Vimeo ID -- the string of numbers associated with a particular Vimeo video (found in the URL of the single-video page on vimeo.com)
ratio The video's width divided by its height. .561

HTML only (to bypass the shortcode)

<div
    data-vimeo-player
    data-video-id="THE_VIMEO_ID" <!-- The string of numbers associated with a Vimeo video. -->
    data-ratio="0.561" <!-- Optional. 0.561 is the default. -->
    >
</div>

Readme

Keywords

Package Sidebar

Install

npm i colby-wp-react-vimeo-player

Weekly Downloads

1

Version

1.0.4

License

ISC

Last publish

Collaborators

  • johnwatkins0