Coder Social home page Coder Social logo

Volume indicator/mute button about mpv-dark-box HOT 4 OPEN

maoiscat avatar maoiscat commented on August 14, 2024
Volume indicator/mute button

from mpv-dark-box.

Comments (4)

maoiscat avatar maoiscat commented on August 14, 2024 1

Thank you for your work.
however the hidden volume icon is a feature rather than a bug, so i suggest you keep it in your own fork.
anyway, i will decline your pull request.

from mpv-dark-box.

Mayurifag avatar Mayurifag commented on August 14, 2024

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

from mpv-dark-box.

Mayurifag avatar Mayurifag commented on August 14, 2024

Okay, I've actually opened a pull request with the naive implementation.
#5

mpv

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 .lua file, if you want to use this interface with volume https://raw.githubusercontent.com/Mayurifag/mpv-dark-box/add-volume-button/dark-box.lua

from mpv-dark-box.

Mayurifag avatar Mayurifag commented on August 14, 2024

Thanks! Lets have open this issue to let users know? Or, maybe, we may have option, that is disabled by default.

from mpv-dark-box.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.