diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-12-07 04:29:37 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-05-07 22:47:09 +0200 |
commit | d973a90bcc30cc7b42bbb17e83fc1ccf4682a2ef (patch) | |
tree | bde21316f385b2a445a6b9c3c72200c93860e9e0 /app/javascript/flavours/glitch/features/video | |
parent | f29f8caccb29c44a5e14ea3629add1a5dc9fdee9 (diff) |
[Glitch] Fix not being able to open audio modal in web UI
Port a8c471fcc043b61aa10cf8f849dfb552db7381d3 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/video')
-rw-r--r-- | app/javascript/flavours/glitch/features/video/index.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 0d267c3a1..6ce4ca85b 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/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 'flavours/glitch/util/fullscreen'; @@ -509,25 +509,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 = () => { |