fix gif autoplay on iOS (#21422)
This commit is contained in:
		
							parent
							
								
									e617ee7fd9
								
							
						
					
					
						commit
						c0dcf15d1e
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,6 @@ import Blurhash from 'mastodon/components/blurhash';
 | 
			
		|||
import classNames from 'classnames';
 | 
			
		||||
import Icon from 'mastodon/components/icon';
 | 
			
		||||
import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
 | 
			
		||||
import { isIOS } from 'mastodon/is_mobile';
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
			
		||||
| 
						 | 
				
			
			@ -109,7 +108,8 @@ export default class MediaItem extends ImmutablePureComponent {
 | 
			
		|||
            src={attachment.get('url')}
 | 
			
		||||
            onMouseEnter={this.handleMouseEnter}
 | 
			
		||||
            onMouseLeave={this.handleMouseLeave}
 | 
			
		||||
            autoPlay={!isIOS() && autoPlayGif}
 | 
			
		||||
            autoPlay={autoPlayGif}
 | 
			
		||||
            playsInline
 | 
			
		||||
            loop
 | 
			
		||||
            muted
 | 
			
		||||
          />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue