Created
January 16, 2015 19:12
-
-
Save Shudouken/5f918ce6ded8b2034806 to your computer and use it in GitHub Desktop.
Make mpv only stay on top while playing
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
| --makes mpv only stay on top while playing | |
| --please note that this won't do anything if ontop is not enabled before pausing | |
| local was_ontop = false | |
| mp.observe_property("pause", "bool", function(name, value) | |
| local ontop = mp.get_property_native("ontop") | |
| if value == true then | |
| if ontop == true then | |
| mp.set_property_native("ontop", false) | |
| was_ontop = true | |
| end | |
| elseif value == false then | |
| if was_ontop and (ontop == false) then | |
| mp.set_property_native("ontop", true) | |
| end | |
| was_ontop = false | |
| end | |
| end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While great! This nor SPACE cycle pause; cycle ontop works with a playlist or multiple dragged files.