diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2020-12-31 07:18:11 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 23:18:11 +0100 |
commit | cb5bb2313b333b8f985e26a09415069b43770a37 (patch) | |
tree | 7ab941f3d6b69ff78d35090d0b8298d4baec61f7 /app/javascript/mastodon/features/ui/components/media_modal.js | |
parent | b5bd67a4775ccd528ce89eb00cfc208b3b8fa75f (diff) |
Fix expand video on public page (#15469)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/media_modal.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/media_modal.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js index 7fe7ed094..08da10330 100644 --- a/app/javascript/mastodon/features/ui/components/media_modal.js +++ b/app/javascript/mastodon/features/ui/components/media_modal.js @@ -32,6 +32,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, }; static contextTypes = { @@ -183,7 +186,7 @@ class MediaModal extends ImmutablePureComponent { /> ); } else if (image.get('type') === 'video') { - const { time } = this.props; + const { currentTime, autoPlay, volume } = this.props; return ( <Video @@ -192,7 +195,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')} |