mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-14 23:24:55 +01:00
22 lines
640 B
React
22 lines
640 B
React
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||
|
|
||
|
const VideoPlayer = React.createClass({
|
||
|
propTypes: {
|
||
|
media: ImmutablePropTypes.map.isRequired
|
||
|
},
|
||
|
|
||
|
mixins: [PureRenderMixin],
|
||
|
|
||
|
render () {
|
||
|
return (
|
||
|
<div style={{ cursor: 'default', marginTop: '8px', overflow: 'hidden', width: '196px', height: '110px', boxSizing: 'border-box', background: '#000' }}>
|
||
|
<video src={this.props.media.get('url')} autoPlay='true' loop={true} muted={true} style={{ width: '100%', height: '100%' }} />
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
export default VideoPlayer;
|