diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-11-25 22:19:15 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-11-25 22:19:15 +0100 |
| commit | ee3d0d98e19f1d8177d85af1866fd0ee431fe9ea (patch) | |
| tree | 41372528e78d4328bc2a47bbbabac7e809c58894 /client/common/video.component.js | |
| parent | 255b8178af1e25a71fd23703d30c0d1f74911f47 (diff) | |
moving stuff
Diffstat (limited to 'client/common/video.component.js')
| -rw-r--r-- | client/common/video.component.js | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/client/common/video.component.js b/client/common/video.component.js deleted file mode 100644 index e5525bf6..00000000 --- a/client/common/video.component.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, { Component } from 'react' -import { connect } from 'react-redux' -import { imageUrl, widths } from '../util' - -import { Gate } from '.' - -class Video extends Component { - state = { - playing: false, - } - - render() { - const { app, data, size } = this.props - const { playing } = this.state - const { sugarcube } = data.metadata - const url = sugarcube.fp.replace('/var/www/files/', 'https://cube.syrianarchive.org/') - const { sha256, verified } = app.mediainfo - const { video } = app.mediainfo.metadata.mediainfo - const keyframe = app.keyframe.metadata.keyframe.basic[0] - return ( - <div className='video'> - {playing - ? <video src={url} autoPlay controls muted /> - : <div - className='bg' - style={{ - width: widths[size || 'sm'], - height: widths[size || 'sm'] / video.aspect_ratio, - backgroundImage: 'url(' + imageUrl(verified, sha256, keyframe, size) + ')', - }} - onClick={() => this.setState({ playing: true })} - > - <div className='play'></div> - </div> - } - </div> - ) - } -} - -const mapStateToProps = () => ({ - tag: 'sugarcube', -}) - -export default connect(mapStateToProps)(props => ( - <Gate View={Video} {...props} /> -)) |
