1
0
Fork 0
forked from gitea/nas

Adding webm playback to UI

This commit is contained in:
Eugen Rochko 2016-09-17 18:05:02 +02:00
parent bd5ad304ba
commit 5342629a0a
3 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,21 @@
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;