-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play and Pause Controls #22
base: master
Are you sure you want to change the base?
Conversation
Adds the ability to use a socket to mpv to control playback. Such as pause and play. Fixes location of xwinwrap as being referenced in users local bin directory.
This would allow for keyboard shortcuts or other scripts to pause the video playback. For example if the desktop is no longer in view or has lost focus it would be possible to reduce CPU and increase battery by running:
|
Updated branch to allow for play/pause to work across multiple connected monitors. And with a better kill in stop() that allows for the grepping of all players currently playing the lastfile while keeping the original kill in place in stop(). --stop in the python needs to be given the file pah or lastfile so that the shell script can grep based on video players rather than a single pid, this will stop playback on all monitors.
Hey there,
Feel free to correct me if I misunderstood your changes. I'd be happy to include your changes into my fork once the above two points have been settled. |
Hey excellent point about the UI. To be fair I would have liked to add a toggle button instead to keep the clutter down, but figured the two was a good enough addition. They aren't needed in the UI as you say as I can see that really being used to stop and change and start a new video. Although I think useful as a backup to forgetting a keybinding. Could I bind --pause to a keyboard shortcut? Yeah, do I trust myself to remember what it was when I get a zoom call and have to quickly pause the background? The xwinwrap missing dependency was causing some issues at least for me on Linux Mint, so that seemed to be more robust pointing directly at the user bin and is a bit cleaner to read source code wise. Again though that's not a necessary addition to carry the play/pause. Thanks for considering the --pause --play switches. It certainly feels nicer to pause and keep the scene in place; since when I stop the video I drop back to a jpg background and opens the possibility of other scripts say a battery monitor being able to swoop in and pause automatically. |
Adds the ability to use a socket to mpv to control playback. Such as pause and play. Fixes location of xwinwrap as being referenced in users local bin directory.
Screenshot