1
3rd Party Plugins - (fb2k) / Re: JSplitter (splitter + SMP x64 alternative)
Last post by marc2k3 -
- Support for on_playlist_items_changed(playlistIndex) adding a hook at on_metadb_changed (no matter if the script also uses that callback or not).
This is an important bug, because it makes impossible to transfer SMP settings to JSplitter.By the way, I haven't touched the code regarding import/export of SMP properties at all, and it works fine in both cases without artifacts at the beginning of the file. Except to remind you that my build is not based on the release SMP 1.6.1, but on the latest 1.6.2-dev on GitHub and updated JSON lib to latest version
That's trivial to do though. Even maintaining compatibility in case the method is missing, so it still works with older SMP/JSplitter versions.
In JSplitter control panel show or hide code is: *.Hidden = true or *.Hidden = false, * for the panel name, for example: webview.Hidden = false means that the panel name webview panel is hidden, let it stop rendering until webview.Hidden = true when the webview panel starts rendering again, minimizing the foobar2000 window should also stop the rendering processWhen checking that, please differentiate between graphic rendering and actually running the script. There are legitimate reasons to have a panel running even if it's hidden or not visible, so processing should be handled by the script itself according to callbacks.Will do. The way I usually implement is to detect when the visual of the component is hidden and then skip the rendering code.
In SMP this is done checking window.IsVisible for ex. which can be used to halt processing if desired.
For ex. if I have a lyrics panel, the lyrics should be retrieved no matter if it's hidden or not... drawing the lyrics only when the panel is visible. Undesirable behavior would be delaying the actual lyric retrieval until the panel is visible. There are tons of examples like that related to playback, tagging, etc.
Now, in this case, since the component has no actual rendering code except for the browser window, maybe it's best to set a flag that can be read from JavaScript and let the client code decide whether to stop rendering or not.
Any other opinions?