[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emms-help] play audio only when playing media
From: |
Alex Vong |
Subject: |
Re: [emms-help] play audio only when playing media |
Date: |
Sat, 18 Jun 2016 10:03:05 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Yoni Rabkin <address@hidden> writes:
> Alex Vong <address@hidden> writes:
>
>> Hi emms,
>>
>> I want to ask is there a way to play audio only when playing a video
>> file, like a mkv file? So far I have tried 2 method, and both failed:
>>
>> Method 1:
>> (setq-default emms-player-vlc-parameters (cons "--no-video"
>> emms-player-vlc-parameters))
>> Problem:
>> I cannot play video anymore. What I want is I can disable video at
>> will.
>
> How about let-binding emms-player-vlc-parameters to include "--no-video"
> in your music-player... function? That would leave other instances with
> the default valie.
You are right! I messed up my Method 2, the correct code should be:
(defun music-play-directory (dir)
(interactive
(let ((promt "Play directory: ")
(mustmatch t))
(list (emms-read-directory-name promt
emms-source-file-default-directory
emms-source-file-default-directory
mustmatch))))
(let ((emms-player-vlc-parameters (cons "--no-video"
emms-player-vlc-parameters)))
(emms-play-directory dir)))
which has the problem that it only works for the 1st video being played
but not for the rest of the video in the directory.