Hello! I am developing a plugin that allows you to load Lua scripts, thereby expanding the functionality of the player. The advantages of this approach are obvious - the simplicity and speed of development. Of course, at the current stage of development, scripts cannot replace plugins, but writing simple automation algorithms is much simpler on scripts than on plug-ins.
Warning: This plugin is under development, global API changes and random crashes are
inevitable.
Documentation is under construction at:
https://lainez.gitbook.io/luabee/Download (v 1.2.1):
Download------
Simple script example-- Very simple example: Pauses the track if volume level in player is 0
-- Some variables
-- in Lua it is common to use local variables
local EVENT_VOLUMECHANGE = 6 -- Volume change event ID
local volLoop = false -- prevent looping =)
-- Callbacks
function ReceiveNotification(source, event)
if event == EVENT_VOLUMECHANGE then
local volume = GetVolume() -- gets volume level
if volume == 0 then
SetPlayState("playpause") -- set playing state
volLoop = true -- prevent looping
end
if volume > 0 and volLoop then
SetPlayState("playpause") -- set playing state
volLoop = false
end
end
end