I remember making something like this myself for a project involving video editor with a "premiere-pro" looking timeline in canvas. At the time I remember looking at other projects like this one but they would have jquery dependencies or a weird api. This one looks nice and would have saved time probably.