diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-12-07 04:29:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 04:29:37 +0100 |
commit | a8c471fcc043b61aa10cf8f849dfb552db7381d3 (patch) | |
tree | d0e966c24acea1908b86327e58a5e41e8b74b402 /app/javascript/mastodon/features/video/index.js | |
parent | 59d943e152a36c693eddd6a6a3c1d9c956dba07b (diff) |
Fix not being able to open audio modal in web UI (#15283)
Fix #15280 Also adds the new action bar and blurhash-based background color to audio and video modals
Diffstat (limited to 'app/javascript/mastodon/features/video/index.js')
-rw-r--r-- | app/javascript/mastodon/features/video/index.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index 46eaebd9b..a2dccdfc0 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { fromJS, is } from 'immutable'; +import { is } from 'immutable'; import { throttle, debounce } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen'; @@ -495,25 +495,13 @@ class Video extends React.PureComponent { } handleOpenVideo = () => { - const { src, preview, width, height, alt } = this.props; - - const media = fromJS({ - type: 'video', - url: src, - preview_url: preview, - description: alt, - width, - height, - }); + this.video.pause(); - const options = { + this.props.onOpenVideo({ startTime: this.video.currentTime, autoPlay: !this.state.paused, defaultVolume: this.state.volume, - }; - - this.video.pause(); - this.props.onOpenVideo(media, options); + }); } handleCloseVideo = () => { |