├── .npmignore ├── lib ├── components │ └── VimeoInput │ │ ├── components │ │ ├── Label │ │ │ ├── index.js │ │ │ └── components │ │ │ │ ├── Description.js │ │ │ │ ├── Title.js │ │ │ │ └── Label.js │ │ └── ConfigFieldsInput │ │ │ ├── components │ │ │ ├── Switch.js │ │ │ └── TextInput.js │ │ │ ├── index.js │ │ │ └── constants.js │ │ ├── styles │ │ └── VimeoInput.css │ │ └── index.js └── base │ └── schema │ └── objects │ ├── vimeoVideo.js │ ├── vimeoOEmbedData.js │ └── vimeoOEmbedConfigData.js ├── .gitignore ├── sanity.json ├── babel.config.js ├── LICENSE ├── package.json └── README.md /.npmignore: -------------------------------------------------------------------------------- 1 | lib 2 | node_modules 3 | -------------------------------------------------------------------------------- /lib/components/VimeoInput/components/Label/index.js: -------------------------------------------------------------------------------- 1 | export { default as Description } from "./components/Description"; 2 | export { default as Label } from "./components/Label"; 3 | export { default as Title } from "./components/Title"; 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime Data 7 | pids 8 | *.pid 9 | *.seed 10 | *.pid.lock 11 | 12 | # Dependency Directories 13 | node_modules/ 14 | 15 | # Optional NPM Cache Directory 16 | .npm 17 | 18 | # Output of 'npm pack' 19 | *.tgz 20 | 21 | # Deployment Directories 22 | dist/ 23 | -------------------------------------------------------------------------------- /lib/components/VimeoInput/components/Label/components/Description.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import formFieldStyles from "part:@sanity/components/formfields/default-style"; 3 | 4 | const Description = props => { 5 | const { children } = props; 6 | 7 | return ( 8 |
| Argument | Default Value | Description |
|---|---|---|
url | None | The URL of the video on Vimeo. This is a required value. |
api | true | Whether to enable the Vimeo player SDK. |
autopause | true | Whether to pause the current video when another Vimeo video on the same page starts to play. |
autoplay | false | Whether to start playback of the video automatically. This feature might not work on all devices. |
background | false | For videos on a Vimeo Plus account or higher: whether to hide all video controls, loop the video automatically, enable autoplay, and mute the video. The loop and autoplay behaviors can't be overridden, but the mute behavior can be; see the muted argument below. |
byline | true | Whether to display the video owner's name. |
callback | None | The name of JavaScript function to use as the callback parameter of a JSONP call. The indicated function wraps the JSON response. |
controls | true | Whether to display (true) or hide (false) all interactive elements in the player interface. To start video playback when controls are hidden, set autoplay to true or use our player API. This argument is available only for Vimeo Pro and Business accounts. |
color | None | The hexadecimal color value of the video controls, which is normally 00ADEF. |
dnt | false | Whether to prevent the player from tracking session data, including cookies. Keep in mind that setting this argument to true also blocks video stats. |
fun | true | Whether to disable informal error messages in the player, such as Oops. |
height | None | The height of the video in pixels. |
loop | false | Whether to restart the video automatically after reaching the end. |
maxheight | None | The height of the video in pixels, where the video won't exceed its native height, no matter the value of this field. |
maxwidth | None | The width of the video in pixels, where the video won't exceed its native width, no matter the value of this field. |
muted | false | Whether to mute playback by default. The user can increase the volume manually. |
player_id | None | The unique ID for the player, which comes back with all JavaScript API responses. |
playsinline | true | Whether the video plays inline on supported mobile devices. |
portrait | true | Whether to display the video owner's portrait. |
quality | auto | For videos on a Vimeo Plus account or higher: the playback quality of the video. Use auto for the best possible quality given available bandwidth and other factors. You can also specify 360p, 540p, 720p, 1080p, 2k, and 4k. |
responsive | false | Whether to return a responsive embed code, or one that provides intelligent adjustments based on viewing conditions. We recommend this option for mobile-optimized sites. |
speed | false | For videos on a Vimeo Plus account or higher: whether to include playback speed among the player preferences. |
texttrack | None | The text track to display with the video. Specify the text track by its language code (en), the language code and locale (en-US), or the language code and kind (en.captions). For this argument to work, the video must already have a text track of the given type; see our Help Center or Working with Text Track Uploads for more information. |
title | true | Whether to display the video's title. |
transparent | true | Whether the background of the player area is transparent on Vimeo. When this value is false, the background of the player area is black. Depending on the video's aspect ratio, there might be visible black bars around the video. |
width | None | The width of the video in pixels. |
xhtml | false | Whether to make the embed code XHTML-compliant. |