Hi I am relatively new to Xibo and am trying to create a custom widget in Xibo v4.
It is a relatively simple widget where a user in the layout editor can select from a select list of radio stations, where the selected one will be streamed on the displays the layout is published to.
I have created a module for this which shows in Administration >> Modules, but when I enable it and go to the layout designer, it does not show up in the widget list.
This is my module’s xml file saved in the custom/modules directory:
<module>
<id>xibosignage-radio-streamer</id>
<name>Radio Streamer</name>
<author>Max de Groot</author>
<description>Stream a selected radio station</description>
<type>radio-streamer</type>
<dataType>message</dataType> <!-- Unused but required -->
<assignable>1</assignable>
<regionSpecific>0</regionSpecific> <!-- Not tied to a visual region -->
<renderAs>html</renderAs>
<defaultDuration>60</defaultDuration>
<properties>
<property id="station" type="select">
<title>Select Radio Station</title>
<options>
<option name="https://www.mp3streams.nl/zender/skyradio/stream/8-mp3-128">Sky Radio</option>
</options>
</property>
</properties>
<stencil>
<twig><![CDATA[
<audio autoplay loop style="display:none;">
<source src="{{ station }}" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
]]></twig>
</stencil>
<onRender><![CDATA[
// Ensure layout scaling continues to work
$(target).xiboLayoutScaler(properties);
]]></onRender>
</module>
Can anybody help me figure out what I’m missing? I think I might be a bit confused about the differences between modules, widgets, and templates.