diff --git a/packages/griffith/src/components/Player/Player.js b/packages/griffith/src/components/Player/Player.js index 2911b517..52361488 100644 --- a/packages/griffith/src/components/Player/Player.js +++ b/packages/griffith/src/components/Player/Player.js @@ -15,6 +15,7 @@ import {MinimalTimeline} from '../Timeline' import getBufferedTime from '../../utils/getBufferedTime' import storage from '../../utils/storage' import Pip from '../../utils/pip' +import isIE from '../../utils/isIE' import {ObjectFitContext} from '../../contexts/ObjectFit' import styles, {hiddenOrShownStyle} from './styles' @@ -179,7 +180,7 @@ class Player extends Component { this.setState({isLoading: true}) } // workaround a bug in IE about replaying a video. - if (this.state.currentTime !== 0) { + if (isIE && this.state.currentTime !== 0) { this.handleSeek(0) } } else { diff --git a/packages/griffith/src/utils/isIE.js b/packages/griffith/src/utils/isIE.js new file mode 100644 index 00000000..57b55f0f --- /dev/null +++ b/packages/griffith/src/utils/isIE.js @@ -0,0 +1,5 @@ +const isIE = + navigator.userAgent.indexOf('compatible') > -1 && + navigator.userAgent.indexOf('MSIE') > -1 + +export default isIE