1.30.0 MP1-5126 - Fix a problem in config volume (1 Viewer)

framug

Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Because I wanted to have value in volume OSD like in Windows 11 (without success) :

    zz0.png


    I dig in MP configuration and, found a bug.
    Do Custom and do Windows 10, Custom values visible :

    zz1.pngzz2.png

    But when you choose Vista or others, it's OK :

    zz3.png

    With this change, it's OK :

    zz4.png

    So, you can test with Configuration.exe inside Configuration.rar, to be copied in C:\Program Files (x86)\Team MediaPortal\MediaPortal folder.
    And, if you agree with, you can put the modified GeneralVolume.cs inside GeneralVolume.rar in \MediaPortal-1\mediaportal\Configuration\Sections of SourceForge.
    C.U.
     

    Attachments

    • Configuration.rar
      1.8 MB
    • GeneralVolume.rar
      4.6 KB

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    Because I wanted to have value in volume OSD like in Windows 11 (without success) :

    zz0.png
    It is possible to have such a display, if you make the necessary modifications to the skin that you use. :)

    The skin engine provides the following built-in skin variables:
    #volume.percent (this has a value in the range 0 to 100)​
    #volume.mute (this has the value true or false)​
    You can use these to display the volume status. The following screenshots show the volume status using these skin variables. The value top-left appears on all panels (other than fullscreen video), while the value bottom-center has an associated timeout and so appears only for a few seconds when the volume is changed or when you move between panels:

    vol_1_enabled.jpg vol_2_disabled.jpg

    The value top-left uses the built-in skin variables and is present in each xml file that displays a panel.

    The value bottom-center is created by "VolumeOverlay.xml", which is where the built-in control tags for volume are located. I don't use those tags (I position them off screen), but I use the visibility of those tags to generate the volume bottom-center, which thus has the associated timeout.

    If you wanted the volume bar with volume level at the end, you could retain the volume bar control, and place #volume.percent at the end of it.

    Note:
    • The volume increments that you see for #volume.percent depend on the other volume settings in "MP Config". With the settings that I use, the volume increases or decreases by 2 when I press the volume up or down button once.
    • There is some weirdness relating to the maximum value displayed. This weirdness may or may not be a bug, but it can be circumvented by enabling Hide Windows OSD in "MP Config".
    • There is a bug relating to the two skin variables in that they are not initialised when the MP client starts, so both remain unsubstituted when used in an expression :(. However, they are set as soon as you change or mute the volume for the first time, and thereafter they are correct for the duration of the session.
    -- from CyberSimian in the UK
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #3
    It is possible to have such a display, if you make the necessary modifications to the skin that you use. :)

    The skin engine provides the following built-in skin variables:
    #volume.percent (this has a value in the range 0 to 100)​
    #volume.mute (this has the value true or false)​
    You can use these to display the volume status. The following screenshots show the volume status using these skin variables. The value top-left appears on all panels (other than fullscreen video), while the value bottom-center has an associated timeout and so appears only for a few seconds when the volume is changed or when you move between panels:

    View attachment 211125 View attachment 211126

    The value top-left uses the built-in skin variables and is present in each xml file that displays a panel.

    The value bottom-center is created by "VolumeOverlay.xml", which is where the built-in control tags for volume are located. I don't use those tags (I position them off screen), but I use the visibility of those tags to generate the volume bottom-center, which thus has the associated timeout.

    If you wanted the volume bar with volume level at the end, you could retain the volume bar control, and place #volume.percent at the end of it.

    Note:
    • The volume increments that you see for #volume.percent depend on the other volume settings in "MP Config". With the settings that I use, the volume increases or decreases by 2 when I press the volume up or down button once.
    • There is some weirdness relating to the maximum value displayed. This weirdness may or may not be a bug, but it can be circumvented by enabling Hide Windows OSD in "MP Config".
    • There is a bug relating to the two skin variables in that they are not initialised when the MP client starts, so both remain unsubstituted when used in an expression :(. However, they are set as soon as you change or mute the volume for the first time, and thereafter they are correct for the duration of the session.
    -- from CyberSimian in the UK
    THX for all informations, as you know, skin skills is not for me then, this could be (maybe) an improvment for the skin I use.

    - "the volume increases or decreases by 2 when I press the volume up or down button once."
    YES, same for me.

    "There is some weirdness relating to the maximum value displayed. This weirdness may or may not be a bug, but it can be circumvented by enabling Hide Windows OSD in "MP Config".
    Well, better would be to ask to dev(s) who decided how it works...

    "There is a bug relating to the two skin variables in that they are not initialised when the MP client starts, so both remain unsubstituted when used in an expression :(. However, they are set as soon as you change or mute the volume for the first time, and thereafter they are correct for the duration of the session."
    Ah, I suppose this could be fixed...

    BTW, the config bug exist and, is fixed with what I propose. ;)
     

    Users who are viewing this thread

    Top Bottom