Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Conversation

@SYBIOTE
Copy link
Contributor

@SYBIOTE SYBIOTE commented Aug 4, 2024

The audio slider in the MediaNodeEditor component was not properly clamped between the values of 0 and 2. This pull request fixes that issue by adding a clamp function to ensure the slider value stays within the desired range.

<InputGroup name="Volume" label={t('editor:properties.media.lbl-volume')} className="w-auto">
<Slider
min={0}
max={100}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to change the min/max/step ?

Copy link
Contributor Author

@SYBIOTE SYBIOTE Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the min max is for the slider UI, is we want the values to be between 0 - 100 on the UI
, we need to use a converter
to convert between 0-2 on the audio scale to 0 - 100 on the UI

Copy link
Contributor Author

@SYBIOTE SYBIOTE Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can keep the values between 0 - 2 on the UI as well, if needed, is that preffered?

@SYBIOTE SYBIOTE requested a review from HexaField August 5, 2024 00:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants