Destroy playback instance on unmount
This commit is contained in:
parent
a22141616e
commit
a4907f8061
1 changed files with 7 additions and 1 deletions
|
@ -75,6 +75,12 @@ export default class MVoiceMessageBody extends React.PureComponent<IProps, IStat
|
||||||
// Note: the RecordingPlayback component will handle preparing the Playback class for us.
|
// Note: the RecordingPlayback component will handle preparing the Playback class for us.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public componentWillUnmount() {
|
||||||
|
if (this.state.playback) {
|
||||||
|
this.state.playback.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
if (this.state.error) {
|
if (this.state.error) {
|
||||||
// TODO: @@TR: Verify error state
|
// TODO: @@TR: Verify error state
|
||||||
|
|
Loading…
Reference in a new issue