diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2020-12-31 07:18:11 +0900 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-05-07 22:47:09 +0200 |
commit | 34cc6f45acb39aa34d7e24e13b82334a135abbaa (patch) | |
tree | 10ae4ec4b759cc8c96f3340f1c278b704fb012c5 /app/javascript/flavours/glitch/features/ui | |
parent | d8e756eda8b8e838c8bb6bed170aab37fde837b7 (diff) |
[Glitch] Fix expand video on public page
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/media_modal.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/media_modal.js b/app/javascript/flavours/glitch/features/ui/components/media_modal.js index e3f3ec6de..a8cbb837e 100644 --- a/app/javascript/flavours/glitch/features/ui/components/media_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/media_modal.js @@ -33,6 +33,9 @@ class MediaModal extends ImmutablePureComponent { onClose: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, onChangeBackgroundColor: PropTypes.func.isRequired, + currentTime: PropTypes.number, + autoPlay: PropTypes.bool, + volume: PropTypes.number, }; state = { @@ -162,7 +165,7 @@ class MediaModal extends ImmutablePureComponent { /> ); } else if (image.get('type') === 'video') { - const { time } = this.props; + const { currentTime, autoPlay, volume } = this.props; return ( <Video @@ -171,7 +174,10 @@ class MediaModal extends ImmutablePureComponent { src={image.get('url')} width={image.get('width')} height={image.get('height')} - currentTime={time || 0} + frameRate={image.getIn(['meta', 'original', 'frame_rate'])} + currentTime={currentTime || 0} + autoPlay={autoPlay || false} + volume={volume || 1} onCloseVideo={onClose} detailed alt={image.get('description')} |