0
0
Fork 0

[Glitch] Fix expand video on public page

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Takeshi Umeda 2020-12-31 07:18:11 +09:00 committed by Claire
parent d8e756eda8
commit 34cc6f45ac
3 changed files with 22 additions and 7 deletions

View file

@ -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')}