A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Simple Music Player Module
-
would it be possible to make it so I could use a keyboard to control the music?
-
@Milk
I use the built-in Monitor’s hard buttons to control the sound.
There’s “alsamixer” command to control volume. But this is not convenient. -
'use strict'; var playingnow = false; document.addEventListener('keypress', (event) => { const keyName = event.key; if(keyName == " " && playingnow == false){ $(audioElement).trigger('play'); $(currentlyPlaying).html(songs[current]).fadeIn(fadeDuriation); playingnow = true; }else if(keyName == " " && playingnow == true){ $(audioElement).trigger('pause'); $(currentlyPlaying).fadeOut(fadeDuriation); playingnow = false; } if(keyName == "."){ next(); } if(keyName == ","){ back(); } });
I have added this code to the mm-music player.js and it now accepts key presses
-
Hi Guys,
I have a problem with the MM-Music_player module.
I just can not get it to work.
No matter what I do. I’ve already tried with the proposed solutions from you, but it does not work.
I do not even know if I have the module installed correctly nor where I need to add it everywhere (config.js, defaultmodules.js)I am grateful for any help.
-
@Rolandb
Hi, are you still facing the issue?