(De-)activate music visualisation with a single click
#1
Hi Forum,

I am trying to (de-)activate music visualisation with a single button click, so I don't have to navigate all the way throught the MusicOSD dialog.

I tried something like
xml:
ActivateWindow(Visualisation)
in remote.xml, but it doesn't have any effect.

xml:
ActivateWindow(VisualisationPresetList)
works fine, giving you a choice of presets, and
xml:
Addon.Default.OpenSettings(xbmc.player.musicviz)
opens the settings dialog for the current visualizer, but how do I open the dialog to choose the visualizer (or none)?

Any help appreciated. Thank you!

Running kodi 19.4 on OSMC.
Reply
#2
Try FullScreen instead.
Reply
#3
Thanks Hitcher! I am trying this starting already from full screen mode ("Visualisation", as in MusicVisualisation.xml), which either shows the artist's fanart, or visualisation, or both (according to skin settings - Confluence in my case).

FullScreen brings me back to the previous menu, but I would like to toggle between fanart and visualisation.

This is how Estuary
xml:
<control type="button" id="5004">
        <width>600</width>
        <include>DialogSettingButton</include>
        <label>$LOCALIZE[250]</label>
        <label2>$INFO[Visualisation.Name]</label2>
        <onclick>Dialog.Close(all)</onclick>
        <onclick>SendClick(500)</onclick>
</control>
and Confluence
xml:

<control type="button" id="500">
        <width>55</width>
        <height>55</height>
        <label>12006</label>
        <font/>
        <texturefocus>OSDVizFO.png</texturefocus>
        <texturenofocus>OSDVizNF.png</texturenofocus>
</control>
bring up the visualisations dialog, but I don't see how it works or how to implement it in the key map.
Reply
#4
I've zero idea if this will work, and as it's nice weather here in the UK I've zero desire to test, but notice that Estuary SendClick and Confluence button id are both 500 which suggests to me that's the window id. So you could try adding a key mapping to do the SendClick(500) or try ActivateWindow(500)
Reply
#5
That's the music playlist window -

Code:
musicplaylist WINDOW_MUSIC_PLAYLIST 10500 MyPlaylist.xml

You need to look for a control with ID 500.
Reply
#6
ID 500 is defined in GUIDialogMusicOSD.cpp only, not in GUIWindowVisualisation.cpp, thus only works in OSD mode. dhead found a solution https://forum.kodi.tv/showthread.php?tid=170305 to open OSD first, then use SendClick in a py script.

It would be nice to have an Action to change GUI settings, as in

cpp:
const std:Confusedhared_ptr<CSettings> settings = CServiceBroker::GetSettingsComponent()->GetSettings();
settings->SetString(CSettings::SETTING_MUSICPLAYER_VISUALISATION, addonID);
settings->Save();

so one could assign a certain visualisation to a key.

Thanks to all!
Reply

Logout Mark Read Team Forum Stats Members Help
(De-)activate music visualisation with a single click0