Created
November 12, 2023 17:29
-
-
Save neumantm/19453667fcd29903805c193774344c24 to your computer and use it in GitHub Desktop.
VLC Rollback on Pause Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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