Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local speedwatching = false
- function onsub(name, text)
- if text == null or text == "" then
- mp.set_property_native("speed", 2.0)
- else
- mp.set_property_native("speed", 1.5)
- end
- end
- function toggle()
- if speedwatching then
- mp.unobserve_property(onsub)
- mp.set_property_native("speed", 1)
- speedwatching = false
- else
- mp.observe_property("sub-text", "string", onsub);
- speedwatching = true
- end
- end
- mp.add_key_binding("H", "speedwatching", toggle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement