Created
April 9, 2015 19:07
-
-
Save Shudouken/efb9891041592cbe3e2b to your computer and use it in GitHub Desktop.
Slideshow
This file contains hidden or 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
| local on = false | |
| function slideshow_handler() | |
| if on == false then | |
| mp.osd_message("Starting slideshow") | |
| on = true | |
| mp.command("playlist_next") | |
| if sl_timer then | |
| sl_timer:resume() | |
| else | |
| sl_timer = mp.add_periodic_timer(5, function() mp.command("playlist_next") end) | |
| end | |
| else | |
| mp.osd_message("Stopping slideshow") | |
| on = false | |
| sl_timer:kill() | |
| end | |
| mp.resume_all() | |
| end | |
| mp.add_key_binding("ctrl+s", "slideshow", slideshow_handler) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment