player: remove previous audio display when loading data from file.

Issue #172 resolved
Trek Hopton created an issue

There is a bug in the UI for the audio player where if a spectrogram and waveform has been displayed, when a new file is loaded from file, the old display remains so that two waveforms are seen. This looks messy and shouldn’t happen. When the new display elements are loaded we should check for existing display elements and remove them.

Comments (2)

  1. Trek Hopton reporter

    The function that loads the spectrogram/waveform view for audio file upload is PlayAudioFile() on line 304 of play.js . Perhaps in this function, it should check if a element already exists within the div with id “waveform“, if so remove it.

    The waveform div which contains this display can be found in audio-player.html which is dynamically loaded added to the html from play.html , see initAudio() in play.js .

  2. Log in to comment