Helium supports a plug-in architecture for creating modules that can be started from Helium and communicate with Helium.

General purpose plug-ins are developed in any .NET language, there are samples available in c# and VB.NET.


Getting started

The best way to get started in creating own plug-ins is to look at our code samples.

Click here for links to the available code repositorities


General plug-ins shall be placed in the folder GeneralPlugins, which is a subfolder where helium.app.exe is located (installation path).

Dependencies

A general purpose plugin must have a reference to two NuGet packages:

  • ImGeneralPluginEngine.Abstractions
  • NeonScripting


ImGeneralPluginEngine.Abstractions

This package contains the following interface:


IImGeneralPlugin (mandatory)

    public interface IImGeneralPlugin
    {
        void InitializePlugin(INeonScriptHost host, Action<IImGeneralPlugin> PluginCloseAction);
        string Name { get; }
        string Author { get; }
        void OnEvent(NeonEventTypes eventType);
        void ClosePlugin();
    }

The InitializePlugin method will be invoked when the plug-in is started from Helium.

PluginCloseAction is an action that shall be invoked if your plug-in implements a way to close the plug-in (menu item, button or similar) to notify Helium that the plug-in was closed.

Name shall return the name of your plug-in

Author shall return the author of the plug-in

OnEvent will be invoked when a specific event occured in Helium. The following event types are available:

  • ActiveTrackChanged - Invoked when the currently playing track changes
  • MusicStopped - Invokedwhen the music is stopped
  • ActiveTrackRated - Invoked when the currently playing track was rated
  • ActiveTrackFavouriteChanged - Invoked the currently playing was set or removed as a favourite

ClosePlugin will be invoked when Helium requests the plug-in to close.


Interacting with Helium

General purpose plug-ins can interact with Helium through Helium's scripting engine. 

A reference to the scripting engine is passed in the InitializePlugin method as the parameter host.

Click here to read more about the scripting engines available methods


Note

Calls to the scripting engine is done through host.RemoteCalls.