mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 18:29:03 +00:00
Destroy playback instance on unmount
This commit is contained in:
@@ -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.
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
if (this.state.playback) {
|
||||
this.state.playback.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public render() {
|
||||
if (this.state.error) {
|
||||
// TODO: @@TR: Verify error state
|
||||
|
||||
Reference in New Issue
Block a user