Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs with timeline rendering when using the dynamic plugin API/loading new files #1226

Closed
samyoung88 opened this issue Oct 11, 2017 · 4 comments

Comments

@samyoung88
Copy link

samyoung88 commented Oct 11, 2017

Currently initializing Timeline plugin on render. It will show when playing/loading the first track but when selecting next track it disappears, but it will reappear when I resize the browser. In a list of tracks, when clicking individually some will show the timeline canvas and some will not. Please advise.

@GitHubRakeshSharma
Copy link

GitHubRakeshSharma commented Oct 12, 2017

I had some similar issue. Each time I selected a new audio the timeline plugin would append a new canvas to the previous timeline canvas. so each time I call the load function i call this code as well:

const timeLineContainer = document.getElementById('_DIV_TIMELINE');
        if (timeLineContainer) {
            while (timeLineContainer.hasChildNodes()) {
                timeLineContainer.removeChild(timeLineContainer.lastChild);
            }
        }

this will remove all childnodes from the timelinecontainer. The plugin will then add a new one.
hope that solves your issue!

@samyoung88
Copy link
Author

This didn't work for me. But I found that the problem is in the plugin where the backend.getDuration() returns an NaN, so the canvas is not getting drawn.

@mspae
Copy link
Contributor

mspae commented Oct 23, 2017

Can you provide a code example?

@mspae mspae changed the title Timeline canvas disappearing when playing next tracks. Bugs with timeline rendering when using the dynamic plugin API/loading new files Oct 29, 2017
@mspae
Copy link
Contributor

mspae commented Oct 29, 2017

@samyoung88 @GitHubRakeshSharma – I think you are both experiencing different bugs. I'm currently putting together a PR on this. The bugs are:

  • Loading a new file/rerendering the timeline does not clear the timeline container from old timeline canvases
  • Dynamically loading the timeline plugin with new files does not render correctly in some cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants