Created
September 29, 2020 11:02
-
-
Save po5/36d6a3ea5451598eb6ddd3d1036fa9c1 to your computer and use it in GitHub Desktop.
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 sub_seek_two(dir) | |
if dir == 1 then | |
target = mp.get_property_number("sub-end") | |
if target then | |
mp.commandv("seek", target-0.03, "absolute+exact") | |
end | |
else | |
target = mp.get_property_number("sub-start") | |
if target then | |
mp.commandv("seek", target+0.01, "absolute+exact") | |
end | |
end | |
end | |
mp.add_key_binding("b", "sub_seek_right", function() return sub_seek_two(1) end) | |
mp.add_key_binding("B", "sub_seek_left", function() return sub_seek_two(-1) end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment