about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/features')
-rw-r--r--app/assets/javascripts/components/features/status/index.jsx4
-rw-r--r--app/assets/javascripts/components/features/ui/components/video_modal.jsx7
2 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index b30d991e4..7ead68807 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -112,8 +112,8 @@ const Status = React.createClass({
     this.props.dispatch(openModal('MEDIA', { media, index }));
   },
 
-  handleOpenVideo (media) {
-    this.props.dispatch(openModal('VIDEO', { media }));
+  handleOpenVideo (media, time) {
+    this.props.dispatch(openModal('VIDEO', { media, time }));
   },
 
   handleReport (status) {
diff --git a/app/assets/javascripts/components/features/ui/components/video_modal.jsx b/app/assets/javascripts/components/features/ui/components/video_modal.jsx
index fa222d7aa..1c3519bd3 100644
--- a/app/assets/javascripts/components/features/ui/components/video_modal.jsx
+++ b/app/assets/javascripts/components/features/ui/components/video_modal.jsx
@@ -20,6 +20,7 @@ const VideoModal = React.createClass({
 
   propTypes: {
     media: ImmutablePropTypes.map.isRequired,
+    time: React.PropTypes.number,
     onClose: React.PropTypes.func.isRequired,
     intl: React.PropTypes.object.isRequired
   },
@@ -27,15 +28,15 @@ const VideoModal = React.createClass({
   mixins: [PureRenderMixin],
 
   render () {
-    const { media, intl, onClose } = this.props;
+    const { media, intl, time, onClose } = this.props;
 
     const url = media.get('url');
 
     return (
       <div className='modal-root__modal media-modal'>
         <div>
-          <IconButton title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} style={closeStyle} />
-          <ExtendedVideoPlayer src={url} muted={false} controls={true} />
+          <div style={closeStyle}><IconButton title={intl.formatMessage(messages.close)} icon='times' overlay onClick={onClose} /></div>
+          <ExtendedVideoPlayer src={url} muted={false} controls={true} time={time} />
         </div>
       </div>
     );