Closed rowild closed 2 years ago
Good point. The place to look in the code is MouseDragHandler
and how this is used within WaveformZoomView
. This handles mousedown
and mouseup
events, where seek happens on mouseup
.
I'd need to think more about what the right solution is, but here are a couple of possibilities:
contextmenu
handler. If there's no contextmenu
handler, right-click would also cause a seek.What do you think?
Thanks, @chrisn , for your feedback! Here are my thoughts:
I am thinking about a situation, where I would use right-click to position the playhead. ATM I believe my habits do not incorporate such a behaviour, be it in a video recording / editing software, any other DAW I use or even a notation software. I checked Audacity (I think Peaks.js or waveform-data has some scripts that are based on Audacity), which does not use right-click to position the playhead.
Personally I use right-click always then, when I want to get additional (context-sensitive) functionality or information on something that I click on. At this moment I do not want to change anything yet.
Also: Since it is now possible to drag the playhead in zoomview (thanks to a recent implementation of yours), would that also mean that it has to be draggable using right-click, when there is no context menu? It currently is: when right-clicking on the waveform, the standard context menu pops up, which can be closed using the ESC key; after that the playhead "is stuck" to the mouse. A left-click frees up the playhead again.
My guts tell me that solution 1 - set playhead position with left-click only - should be the one to strive for.
But maybe others are used to a different UX/UI experience and would contradict me. So I pass on your question to all the other readers asking for feedback: What do you think?
Thanks. I've implemented option 1, which seems like a reasonable solution.
You are so incredibly quick! Thank you very, very much!
@chrisn Any chance to push a new version to npm?
v1.1.0 is now available in npm.
Muchas gracias!!
The new
contextmenu
feature causes the playhead to be set to the right-click position all the time, too. This is probably not what a user would expect to happen.https://user-images.githubusercontent.com/213803/160275044-9cca8ee6-ac89-4c99-bc4e-812be8f86f3a.mp4
It seems this is connected to the
seek
feature of theplayer
, unfortunately I am unable to find out how to fix this behaviour.