diff options
| author | navewindre <boneyaard@gmail.com> | 2025-04-05 03:00:29 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-04-05 03:00:29 +0200 |
| commit | d6c4365b8de32b621ac46074a9b69908b95686c0 (patch) | |
| tree | 495cb5b1aa7e68ab6ec07fa5fb09904a8c7e47e7 /config/mpv/scripts/subs2srsa/utils/pause_timer.lua | |
| parent | b24463f3d045783b8f4e72926054d53b908e150f (diff) | |
a
Diffstat (limited to 'config/mpv/scripts/subs2srsa/utils/pause_timer.lua')
| -rw-r--r-- | config/mpv/scripts/subs2srsa/utils/pause_timer.lua | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/config/mpv/scripts/subs2srsa/utils/pause_timer.lua b/config/mpv/scripts/subs2srsa/utils/pause_timer.lua deleted file mode 100644 index e37b0ea..0000000 --- a/config/mpv/scripts/subs2srsa/utils/pause_timer.lua +++ /dev/null @@ -1,33 +0,0 @@ ---[[ -Copyright: Ren Tatsumoto and contributors -License: GNU GPL, version 3 or later; http://www.gnu.org/licenses/gpl.html - -Pause timer stops playback when reaching a set timing. -]] - -local mp = require('mp') -local stop_time = -1 -local check_stop - -local set_stop_time = function(time) - stop_time = time - mp.observe_property("time-pos", "number", check_stop) -end - -local stop = function() - mp.unobserve_property(check_stop) - stop_time = -1 -end - -check_stop = function(_, time) - if time > stop_time then - stop() - mp.set_property("pause", "yes") - end -end - -return { - set_stop_time = set_stop_time, - check_stop = check_stop, - stop = stop, -} |
