diff options
author | Starfall <root@starfall.blue> | 2020-05-10 02:59:07 -0500 |
---|---|---|
committer | Starfall <root@starfall.blue> | 2020-05-10 02:59:07 -0500 |
commit | 77fa1183cc113e3d3d20140e3545443cf6c7f170 (patch) | |
tree | 2ce4e4dd5235999d163350779f18cf74fe1ff0d1 /app/javascript/flavours/glitch/features/ui/components | |
parent | b107e4f771f036b214563764fcd95786f8016ee7 (diff) | |
parent | c6ff4c634caf718adf7280e04909c091d15add1d (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/video_modal.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/video_modal.js b/app/javascript/flavours/glitch/features/ui/components/video_modal.js index e7309021e..afeff90a4 100644 --- a/app/javascript/flavours/glitch/features/ui/components/video_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/video_modal.js @@ -16,7 +16,11 @@ export default class VideoModal extends ImmutablePureComponent { static propTypes = { media: ImmutablePropTypes.map.isRequired, status: ImmutablePropTypes.map, - time: PropTypes.number, + options: PropTypes.shape({ + startTime: PropTypes.number, + autoPlay: PropTypes.bool, + defaultVolume: PropTypes.number, + }), onClose: PropTypes.func.isRequired, }; @@ -28,7 +32,8 @@ export default class VideoModal extends ImmutablePureComponent { } render () { - const { media, status, time, onClose } = this.props; + const { media, status, onClose } = this.props; + const options = this.props.options || {}; return ( <div className='modal-root__modal video-modal'> @@ -37,7 +42,9 @@ export default class VideoModal extends ImmutablePureComponent { preview={media.get('preview_url')} blurhash={media.get('blurhash')} src={media.get('url')} - startTime={time} + startTime={options.startTime} + autoPlay={options.autoPlay} + defaultVolume={options.defaultVolume} onCloseVideo={onClose} detailed alt={media.get('description')} |