componentDidUpdate()

in src/components/Player.js [31:47]


    componentDidUpdate() {
        const {sessionId} = this.props

        if (sessionId !== undefined && sessionId != null) {
            if (this.props.sessionId !== this.state.sessionId) {
                this.setState({sessionId: this.props.sessionId, isLoading: true})
                
                this.getRecordingURL(this.props.sessionId)
            }
        }
        else if (this.state.presignedURL != null) {
            let silence = window.location.protocol + '//' + window.location.host + "/silence.wav"
            
            this.wavesurfer.load(silence)
            this.setState({presignedURL: null})
        }
    }