Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433

    Slider Control in Home Menus?

    I hope I have the term "home" menu correct. I am referring to the ability of creating plugin menus within the player menus such as Settings.

    I can successfully create menus with radio buttons on plugin menus but was wondering if it was possible to do this with slider controls. The limited documentation is not clear.

    As an experiment I tried to place a few sliders on a sub menu panel and only got the panel header with the rest blank. And worse my server cycles went crazy when I opened that panel. I had to reboot the server.
    Chris

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,555
    I have a slider in Radio France plugin as a very simple selector for a number range.

    Code:
    	[% WRAPPER setting title="PLUGIN_RADIOFRANCE_STREAMDELAY" desc="PLUGIN_RADIOFRANCE_STREAMDELAY_DESC" %]
    
    		<input type="text" class="stdedit sliderInput_0_99_1" name="pref_streamdelay" id="pref_streamdelay" value="[% prefs.streamdelay %]" size="2">
    
    	[% END %]
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  3. #3
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,591

    Slider Control in Home Menus?

    > I hope I have the term "home" menu correct. I am referring to the
    > ability of creating plugin menus within the player menus such as
    > Settings.

    What UI?

  4. #4
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,025
    Quote Originally Posted by mherger View Post
    > I hope I have the term "home" menu correct. I am referring to the
    > ability of creating plugin menus within the player menus such as
    > Settings.

    What UI?
    Default supports sliders. Classic, and hence also Material, does not show sliders.
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,591

    Slider Control in Home Menus?

    > Default supports sliders. Classic, and hence also Material, does not
    > show sliders.


    I was wondering how hard it would be to give the settings pages a bit
    Material love. Are there possibilities, to eg. replace some input
    elements with materialized controls? Similarly to how Default does it?
    The latter is using the same HTML as all the other skins, but applies
    some JS magic to render controls after loading the same HTML.

  6. #6
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Quote Originally Posted by mherger View Post
    > I hope I have the term "home" menu correct. I am referring to the
    > ability of creating plugin menus within the player menus such as
    > Settings.

    What UI?
    Well I am not sure of the term (I was hoping it was "home"). But if you go to the SB Touch for example and you add a menu to the Settings via JIVE.
    Chris

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,591

    Slider Control in Home Menus?

    > Well I am not sure of the term (I was hoping it was "home"). But if you
    > go to the SB Touch for example and you add a menu to the Settings via
    > JIVE.


    Ok, that's what we usually refer to as SqueezePlay. I must admit I don't
    have the answer readily available. Your best bet is to look into
    existing code. Eg. how the alarm volume setting or "minAutoBrightness"
    are implemented in Slim/Control/Jive.pm.

  8. #8
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Quote Originally Posted by mherger View Post
    > Well I am not sure of the term (I was hoping it was "home"). But if you
    > go to the SB Touch for example and you add a menu to the Settings via
    > JIVE.


    Ok, that's what we usually refer to as SqueezePlay. I must admit I don't
    have the answer readily available. Your best bet is to look into
    existing code. Eg. how the alarm volume setting or "minAutoBrightness"
    are implemented in Slim/Control/Jive.pm.
    OK. I am on it. I think I was pretty far into it but ran into a few problems. The sample will allow me to compare notes.

    One issue I ran into that I hope was a fluke is that when my menu with the slider was instantiated my LMS went absolutely crazy and sucked up all the compute resources in my NAS. Crazy that could even happen. I must have sent something to the deep end of the pool. :-)
    Chris

  9. #9
    Senior Member
    Join Date
    Mar 2017
    Posts
    3,025
    Quote Originally Posted by mherger View Post
    > Default supports sliders. Classic, and hence also Material, does not
    > show sliders.


    I was wondering how hard it would be to give the settings pages a bit
    Material love. Are there possibilities, to eg. replace some input
    elements with materialized controls? Similarly to how Default does it?
    The latter is using the same HTML as all the other skins, but applies
    some JS magic to render controls after loading the same HTML.
    Must admit I'm not 100% satisified with the current Material-isation of the server and player settings. This probably belongs in the Material thread, or (better) a github issue, but (apart from sliders) what else is missing?
    Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.

  10. #10
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Well its probable that I suck at interpreting the jive.pm sample for a slider but all I got on the player was a menu item labeled Text that went to another blank panel. No sight of a slider on the original panel the menu was slated for. :-(

    my @menu = ();
    my $i = 0;
    $gMenuUpdate = 1; # update menus from amp

    push @menu, {
    text => 'Text',
    count => 1,
    offset => 0,
    item_loop => {
    slider => 1,
    min => 30,
    max => 50,
    #help => NO_HELP_STRING_YET,
    #adjust => 1,
    initial => 40,
    actions => {
    do => {
    player => 0,
    cmd => [ 'avpSetChannels', $i ],
    },
    },
    }
    };
    $i++;

    my $numitems = scalar(@menu);

    $request->addResult("count", $numitems);
    $request->addResult("offset", 0);
    my $cnt = 0;
    for my $eachItem (@menu[0..$#menu]) {
    $request->setResultLoopHash('item_loop', $cnt, $eachItem);
    $cnt++;
    }

    $request->setStatusDone();
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •