I found four problems that didn't meet the expectation
See original GitHub issuehi, I found some problems when using wavesurfer.js@4.2.0 and hope it can be fixed。
-
wavesurfer.addRegion And region.update Method does not trigger the region update end event. I think adding the region update end event is forgetting some scenarios.
-
The minimap plug-in does not display initialized regions. I think the minimap In the _onshouldrender method, it is added to get the existing regions from region as the initial value.
-
Unexpected horizontal scroll bar. In the browser, the data returned by getplayedpercents of media is not between 0 and 1. If the returned data is greater than 1, the width of the wave node playing will be larger than that of the parent, resulting in the horizontal scroll bar.
-
When the window size is modified, the waveform is not redrawn. I don’t know why there is such a judgment! this.params.scrollParent 。 If this.params.scrollParent If it is false, the window size will be adjusted if the audio is short, but the waveform will not be re rendered.
Please forgive my English is very bad. At the same time, I hope to get your reply.
中文
1、 wavesurfer.addRegion
和 region.update
方法不会触发 region-update-end
事件。我认为是在添加 region-update-end
事件是遗忘了一些场景。
2、Minimap
插件是不会显示初始化的 regions。我认为在 Minimap 的 _onShouldRender
方法中添加从 region 中获取当前已经存在的 regions 作为初始值。
3、意外的水平滚动条,在浏览器中媒体的 getPlayedPercents 返回的数据不是鉴于0和1之间的,如果返回的数据是大于1的,会造成播放的 wave 节点,宽度大于父级,从而造成水平滚动条。
4、窗口大小修改的时候波形是没有重新绘制的,我不知道为什么会有这样的一个判断 !this.params.scrollParent
。如果 this.params.scrollParent 是 false,会在音频比较短的情况下,调整窗口大小但是波形没有重新渲染。
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
I see what you mean. This might be a bug.
@thijstriemstra
When scrollParent is true, onResize does not resize the canvas, so you can end up with this by dragging the window to make it bigger:
Not sure if bug or there for a reason.
@palufra90 feel free to open that ticket.