diff --git a/app/containers/message/Audio.tsx b/app/containers/message/Audio.tsx index 51d4b53c6..21737ca2f 100644 --- a/app/containers/message/Audio.tsx +++ b/app/containers/message/Audio.tsx @@ -20,6 +20,8 @@ import { TGetCustomEmoji } from '../../definitions/IEmoji'; import { IAttachment } from '../../definitions'; import { TSupportedThemes } from '../../theme'; import { downloadAudioFile } from '../../lib/methods/audioFile'; +import EventEmitter from '../../lib/methods/helpers/events'; +import { PAUSE_AUDIO } from './constants'; interface IButton { loading: boolean; @@ -128,6 +130,11 @@ class MessageAudio extends React.Component { + EventEmitter.removeListener(PAUSE_AUDIO, this.pauseSound); + this.togglePlayPause(); + }; + async componentDidMount() { const { file, messageId } = this.props; const { baseUrl, user } = this.context; @@ -183,6 +190,7 @@ class MessageAudio extends React.Component