apostrophe
Version:
The Apostrophe Content Management System.
43 lines (41 loc) • 1.32 kB
JavaScript
// Provides the `@apostrophecms/video` widget, which displays videos, powered
// by [@apostrophecms/video-field](../@apostrophecms/video-field/index.html) and
// [@apostrophecms/oembed](../@apostrophecms/oembed/index.html). The video
// widget accepts the URL of a video on any website that supports the
// [oembed](http://oembed.com/) standard, including vimeo, YouTube, etc.
// In some cases the results are refined by oembetter filters configured
// by the `@apostrophecms/oembed` module. It is possible to configure new
// filters for that module to handle video sites that don't natively support
// oembed.
//
// Videos are not actually hosted or stored by Apostrophe.
module.exports = {
extend: '@apostrophecms/widget-type',
options: {
label: 'apostrophe:video',
className: false,
icon: 'play-box-icon',
placeholder: true,
placeholderClass: false,
placeholderUrl: 'https://youtu.be/Q5UX9yexEyM'
},
// NOTE: Disabled until we are out of beta
// styles: {
// add: {
// width: 'width',
// alignment: 'alignment'
// }
// },
fields: {
add: {
video: {
type: 'oembed',
name: 'video',
oembedType: 'video',
label: 'apostrophe:videoUrl',
help: 'apostrophe:videoUrlHelp',
required: true
}
}
}
};