1.0.4 • Published 7 years ago

colby-wp-react-vimeo-player v1.0.4

Weekly downloads
45
License
ISC
Repository
github
Last release
7 years ago

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:

NameDescriptionDefault
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)
ratioThe 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>