muxinc/elements

Feature Request: change values of seek forward/backward with leftarrow or rightarrow

Closed this issue ยท 5 comments

Is there an existing issue for this?

  • I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-player

Description

By default when press left or right arrow the value of seeking forward/backward is 10 seconds.
I tried to change the value for: forward-seek-offset or backward-seek-offset.
But it won't apply to hotkey. It only apply to button the get hit by mouse on UI

image

Expected Behavior

Could you guys add additional attributes to the config seeking value for hotkeys or help showing me where in the source code I could/patch to change the default seeking forward/backward value from hotkey.

Thanks for the feedback, @hoangbits. We've got a few things stacked up in the priority queue right now, but this definitely sounds like a good idea! I'm highly confident we'll want to do this at some point and I'll keep you posted on any progress made or if we for whatever reason end up deciding against it.

Thanks for the feedback, @hoangbits. We've got a few things stacked up in the priority queue right now, but this definitely sounds like a good idea! I'm highly confident we'll want to do this at some point and I'll keep you posted on any progress made or if we for whatever reason end up deciding against it.

We might not need additional config variable to handle our case.

I haven't digging into the source code, But if you could share where could I modify default value of 10 seconds to 0.1 seconds. It would be awesome. We could patch your code.

Thanks for the offer, @hoangbits! Happy to help guide you through this, though it is unfortunately/surprisingly a bit trickier than one might assume, since all of the keyboard interactions are defined by a separate library for building media UIs (that we also own/maintain) called Media Chrome. So step one is updating media chrome to allow this to be configurable, likely adding some attribute(s) to use here https://github.com/muxinc/media-chrome/blob/main/src/js/media-controller.js#L449-L467 when present (otherwise stick with the default). I have a meeting with the team today, and I'll be sure to discuss this feature, including things like attribute names, 1 vs. 2 attributes, and the like. If you're still interested in contributing, I'd start by creating a new issue and labeling it as 'enhancement' on the Media Chrome, with a link to this issue.

Just an update here. While discussing this feature in the media chrome meeting I mentioned, I started writing pseudo-code that ended up being actual code that I figured I might as well just implement, so https://github.com/muxinc/media-chrome/pull/852/files should hopefully be merged and released soon, after which we can add the feature to Mux Player.

Feature just got merged. Should be part of the next release! If you wanted to try it out before then, you should be able to use the canary release of either mux-player or mux-player-react (2.3.3-canary.0-b419de9).