On Tue, 28 Mar 2023 23:44:44 +0200 "Dr. Arne Babenhauserheide" <[email protected]> wrote:
> Can emms play a video playlist in a way that uses a single window > instead of opening a new player window for each track? Having videos pop > up disturbs my exwm-workflow … > > I use it with mpv (which uses a single video window when I run it with > many files from the terminal) — can I adjust emms to send mpv all tracks > in one go? Hi, I think it can potentially be implemented like that - i.e. sync while playlist to mpv and switch tracks in it - but not how it currently works, yeah. Hard to say if it'll be better than current way of doing it in general, as it might be more work and more error-prone to keep two full copies of playlist around like that, instead of just one, as it currently is. But anyway, I think there might be a different solution to the issue - make mpv not remove its window after it finishes playing the track or changes it. It's been brought up in context of exwm earlier too, here: https://www.mail-archive.com/[email protected]/msg02317.html I'd suggest trying the same mpv "keep window open" opts first, i.e.: --force-window=immediate --keep-open=always You can add those globally, if that's primary use of emms, or it might be desirable to have mpv window stashed away just-in-case somewhere, or change them in mpv instance on-the-fly via emacs key/command or maybe a hook that'd auto-detect when they're needed. You can do it something like this on-the-fly for a running mpv instance: (emms-player-mpv-cmd '(set_property force-window yes)) (emms-player-mpv-cmd '(set_property keep-open always)) These "running" instances are never closed by emms backend, so it should last until you close emacs or mpv exits by itself for some reason, I think. Iirc one trick to easily toggle mpv window on/off with these "persistent window" opts is changing "vo" to "null", i.e. with --force-window=immediate and whatever else in options, you can do: (emms-player-mpv-cmd '(set_property vo null)) And that window should be gone, without affecting playback. Setting "vo" back to "gpu" should bring the window back. Hope it helps. Cheers! -- Mike Kazantsev // fraggod.net
