Skip to content

Commit

Permalink
remove unneccessary resize handler (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra authored Mar 22, 2021
1 parent cebcc02 commit db67e52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# videojs-wavesurfer changelog

## 3.7.0 - unreleased

- Remove unneccessary resize handler for `fluid` mode (#132)


## 3.6.0 - 2021/03/06

- Bump required wavesurfer.js version to 4.6.0 or newer
Expand Down
16 changes: 0 additions & 16 deletions src/js/videojs.wavesurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ class Wavesurfer extends Plugin {
if (this.player.options_.fluid === true) {
// give wave element a classname so it can be styled
this.surfer.drawer.wrapper.className = wavesurferClassName;
// listen for window resize events
this.responsiveWave = WaveSurfer.util.debounce(
this.onResizeChange.bind(this), 150);
window.addEventListener(Event.RESIZE, this.responsiveWave);
}
}

Expand Down Expand Up @@ -770,18 +766,6 @@ class Wavesurfer extends Plugin {
}, 100);
}

/**
* Fired when the video.js player is resized.
*
* @private
*/
onResizeChange() {
if (this.surfer !== undefined) {
// redraw waveform
this.redrawWaveform();
}
}

/**
* Redraw waveform.
*
Expand Down

0 comments on commit db67e52

Please sign in to comment.