mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-08 19:01:43 +01:00
Merge pull request #6101 from jaiwanth-v/voice-message-destroy
Destroy playback instance on voice message unmount
This commit is contained in:
commit
84bdd61119
@ -75,6 +75,10 @@ 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() {
|
||||||
|
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…
x
Reference in New Issue
Block a user