From 47bf592db786107f0cdc67b98f55c947acdb5a51 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 7 Mar 2017 09:54:57 +0100 Subject: Try to detect iOS and *not* autoplay any videos Technically the check for iOS from components is a side effect, because it's neither in state nor props, but the user agent does not change, so I think that's okay. --- app/assets/javascripts/components/components/media_gallery.jsx | 3 ++- app/assets/javascripts/components/components/video_player.jsx | 3 ++- app/assets/javascripts/components/is_mobile.jsx | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/assets/javascripts/components/components/media_gallery.jsx b/app/assets/javascripts/components/components/media_gallery.jsx index cd2394023..72b5e977f 100644 --- a/app/assets/javascripts/components/components/media_gallery.jsx +++ b/app/assets/javascripts/components/components/media_gallery.jsx @@ -2,6 +2,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import { isIOS } from '../is_mobile'; const messages = defineMessages({ toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' } @@ -161,7 +162,7 @@ const Item = React.createClass({