diff options
author | James Adney <jfadney@gmail.com> | 2022-11-27 11:46:23 -0800 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-11-28 11:55:09 +0100 |
commit | 2815ac41557864932d163d52f67ff4aee7b834fb (patch) | |
tree | a3c12cc33a07646bf4afdce40a91ec48f05ce157 /app/javascript/flavours/glitch/components | |
parent | c0bf90ac19fd4e8d6b11b8e4f3d48174f15ca57e (diff) |
[Glitch] fix gif autoplay on iOS
Port c0dcf15d1ec357cedd89025a1b210bdc21422b59 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r-- | app/javascript/flavours/glitch/components/media_gallery.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index 5414b4858..ac0d05926 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.js +++ b/app/javascript/flavours/glitch/components/media_gallery.js @@ -4,7 +4,6 @@ import PropTypes from 'prop-types'; import { is } from 'immutable'; import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { isIOS } from '../is_mobile'; import classNames from 'classnames'; import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; import { debounce } from 'lodash'; @@ -202,7 +201,7 @@ class Item extends React.PureComponent { </a> ); } else if (attachment.get('type') === 'gifv') { - const autoPlay = !isIOS() && this.getAutoPlay(); + const autoPlay = this.getAutoPlay(); thumbnail = ( <div className={classNames('media-gallery__gifv', { autoplay: autoPlay })}> @@ -216,6 +215,7 @@ class Item extends React.PureComponent { onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} autoPlay={autoPlay} + playsInline loop muted /> |