Discussion:
[emms-help] buffer-local `emms-player-list'
Yoni Rabkin
2018-10-15 16:22:01 UTC
Permalink
Heads-up: I'm considering adding a buffer-local `emms-player-list'
variable, or marking `emms-player-list' buffer-local, with the obvious
goal of enable playing different playlists to call different players.
--
"Cut your own wood and it will warm you twice"
Mike Kazantsev
2018-10-15 17:30:01 UTC
Permalink
On Mon, 15 Oct 2018 12:22:01 -0400
Post by Yoni Rabkin
Heads-up: I'm considering adding a buffer-local `emms-player-list'
variable, or marking `emms-player-list' buffer-local, with the obvious
goal of enable playing different playlists to call different players.
Guess there would have to be an optional argument to stop/play/etc
commands to specify non-default playlist?

And to use multiple playlists same as one'd do currently, there'd need
to be a hook to stop current playback and set playlist as default when
starting any track from it.


With long-running mpv instances, I'm not sure if reusing same player
instance between all playlists would be a bug or a feature, as it's
good for different use-cases either way.
(e.g. using it for single-output music stream as I do, definitely like
it switching between playlists instantly without starting anything)

Guess there can be a customizable var that'd flip these via
make-local-variable / kill-local-variable as necessary.
--
Mike Kazantsev // fraggod.net
Yoni Rabkin
2018-10-17 19:17:08 UTC
Permalink
Post by Mike Kazantsev
On Mon, 15 Oct 2018 12:22:01 -0400
Post by Yoni Rabkin
Heads-up: I'm considering adding a buffer-local `emms-player-list'
variable, or marking `emms-player-list' buffer-local, with the obvious
goal of enable playing different playlists to call different players.
Guess there would have to be an optional argument to stop/play/etc
commands to specify non-default playlist?
And to use multiple playlists same as one'd do currently, there'd need
to be a hook to stop current playback and set playlist as default when
starting any track from it.
With long-running mpv instances, I'm not sure if reusing same player
instance between all playlists would be a bug or a feature, as it's
good for different use-cases either way.
(e.g. using it for single-output music stream as I do, definitely like
it switching between playlists instantly without starting anything)
Guess there can be a customizable var that'd flip these via
make-local-variable / kill-local-variable as necessary.
A lot would have to change in order to support this. For instance,
variables like `emms-player-playing-p' imply a single player where no
such implication is necessary (no reason for it not to be a list). There
shouldn't be any reason why I can't launch a video with player A (that
can play videos but can't play network streams) and then a soundtrack
for that video with Player B (that can't play videos, but can stream
music).

Stopping the players would default to stopping each in the order of the
last player started, and `emms-stop' could also be called with C-u M-x
emms-stop and take a "playing" player as an interactive argument. These
commands would also gain counterparts with names such as "emms-stop-all"
which would endeavor to stop playback in all of the players currently
running.

Rest assured that the code will live in a separate branch for the near
future (now this branch is local to my machine, and in the future a
branch on the git repo).
--
"Cut your own wood and it will warm you twice"
Loading...