this is the @magic-modules VideoEmbed component. it renders videos from any http url that allows iframe embedding.
npm install @magic-modules/video-embedin a page/component, just pass a video id to the VideoEmbed module.
VideoEmbed('ecIWPzGEbFc')if the video id is a number, the video is assumed to be hosted on vimeo
VideoEmbed(153090637)
VideoEmbed('153090637')videos from arbitrary hosts can be included as well, as long as those hosts allow iframe embeds',
VideoEmbed('https://videopress.com/embed/kUJmAcSf')you can pass a width and height, a style object and any other props to the video.'),
VideoEmbed({ src: '8QYWGCEm2Dc', width: '50%', style: { margin: 1em 0 0; } })to set a fixed video size, simply add both a height and a width value (px, em, rem, vh, pt).
VideoEmbed({ src: 'SMhwddNQSWQ', width: '300px', height: '900px' }),first release
update docs
- require node 13.5.0
- ready for markdown
bump required node version to 14.2.0
bump required node version to 14.15.4
BREAKING: rename props.src to props.id
...