mirror of
https://github.com/strapi/strapi.git
synced 2025-12-21 04:06:05 +00:00
27 lines
525 B
JavaScript
27 lines
525 B
JavaScript
/**
|
|
*
|
|
* Video
|
|
*
|
|
*/
|
|
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
/* eslint-disable jsx-a11y/media-has-caption */
|
|
const Video = props => {
|
|
const { height, src, width } = props.contentState.getEntity(props.entityKey).getData();
|
|
|
|
return (
|
|
<video height={height} width={width} style={{ maxWidth: '100%' }} controls>
|
|
<source src={src} />
|
|
</video>
|
|
);
|
|
};
|
|
|
|
Video.propTypes = {
|
|
contentState: PropTypes.object.isRequired,
|
|
entityKey: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default Video;
|