Skip to content

Instantly share code, notes, and snippets.

@neumantm
Created November 12, 2023 17:29
Show Gist options
  • Save neumantm/19453667fcd29903805c193774344c24 to your computer and use it in GitHub Desktop.
Save neumantm/19453667fcd29903805c193774344c24 to your computer and use it in GitHub Desktop.
VLC Rollback on Pause Plugin
function descriptor()
return {
title = "Rollback X Seconds",
capabilities = {"input-listener", "playing-listener"}
}
end
function activate()
end
function close()
end
function deactivate()
end
function input_changed()
end
function playing_changed()
local TIME_DELTA = -3
if vlc.playlist.status()=="paused" then
local timePassed = vlc.var.get(vlc.object.input(), "time")
local newTime = timePassed + TIME_DELTA
vlc.osd.message(TIME_DELTA, vlc.osd.channel_register(), "top-left", 1400000)
vlc.var.set(vlc.object.input(), "time", newTime)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment