-
Notifications
You must be signed in to change notification settings - Fork 5
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
Volume indicator/mute button #4
Comments
I see its already coded, but seems to be not used? -- volume
ne = new_element("volume", "button")
ne.content = function()
local volume = mp.get_property_number("volume", 0)
local mute = mp.get_property_native("mute")
local volicon = {"\238\132\139", "\238\132\140",
"\238\132\141", "\238\132\142"}
if volume == 0 or mute then
return "\238\132\138"
else
return volicon[math.min(4,math.ceil(volume / (100/3)))]
end
end
ne.eventresponder["mbtn_left_up"] =
function () mp.commandv("cycle", "mute") end
ne.eventresponder["wheel_up_press"] =
function () mp.commandv("osd-auto", "add", "volume", 5) end
ne.eventresponder["wheel_down_press"] =
function () mp.commandv("osd-auto", "add", "volume", -5) end |
Okay, I've actually opened a pull request with the naive implementation. Its not that fancy as mpv-dark-box's interface, but more looks like the stock mpv interface one. Still I'd rather have volume button to be presented in the interface even if its ugly, then not to have it. Link to |
Thank you for your work. |
Thanks! Lets have open this issue to let users know? Or, maybe, we may have option, that is disabled by default. |
@maoiscat hi! Thanks to your mpv extension, its so much better than default osc, I liked it very much! ❤️
However, I'm missing volume button: that was very handy to have ability to mute sound fast (via left-clicking on volume button) and change volume (via scrolling on icon up and down). Still, I see the code about volume in .lua file. Is there any way I can get volume button back? Isn't it just forgotten to be shown on interface? I can't see in Windows nor Linux environments.
Thanks in advance! 👍🏻
The text was updated successfully, but these errors were encountered: