<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Simple Music Player Module]]></title><description><![CDATA[<p dir="auto"><img src="http://i.imgur.com/bQYOC0h.png" alt="MM Music Player" class=" img-fluid img-markdown" /></p>
<p dir="auto">First module, first time using node, go easy on me ;)</p>
<p dir="auto">I  made this for the original MagicMirror that used the standard xampp stack, so this was originally made using PHP for the back end part of it. I basically ported this over to MagicMirror2 from there.</p>
<p dir="auto">[card:masters1222/mm-music-player]<br />
Basically, this is a simple music player. Add your music (must be .mp3) to the music directory in the module and it will automatically detect them. No need to manage a list of file names or anything like that. After that, simply click play.</p>
<p dir="auto"><strong>Note</strong>: You do need to be able to click the buttons, otherwise the music won’t start. I may apply an option to the config to auto play on launch if anyone is interested. I have made it this way as I am working on a MagicMirror that I plan to make touch screen (well, try it).</p>
]]></description><link>https://forum.magicmirror.builders/topic/38/simple-music-player-module</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 01:28:11 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/38.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 May 2016 01:18:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Simple Music Player Module on Sat, 07 Apr 2018 15:06:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rolandb" aria-label="Profile: Rolandb">@<bdi>Rolandb</bdi></a><br />
Hi, are you still facing the issue?</p>
]]></description><link>https://forum.magicmirror.builders/post/38077</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/38077</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Sat, 07 Apr 2018 15:06:35 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 22 Jan 2018 17:57:40 GMT]]></title><description><![CDATA[<p dir="auto">Hi Guys,</p>
<p dir="auto">I have a problem with the MM-Music_player module.<br />
I just can not get it to work.<br />
No matter what I do. I’ve already tried with the proposed solutions from you, but it does not work.<br />
I do not even know if I have the module installed correctly nor where I need to add it everywhere (config.js, defaultmodules.js)</p>
<p dir="auto">I am grateful for any help.</p>
]]></description><link>https://forum.magicmirror.builders/post/34453</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/34453</guid><dc:creator><![CDATA[Rolandb]]></dc:creator><pubDate>Mon, 22 Jan 2018 17:57:40 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Fri, 03 Nov 2017 20:23:21 GMT]]></title><description><![CDATA[<pre><code>			'use strict';
			var playingnow = false;
			document.addEventListener('keypress', (event) =&gt; {
				const keyName = event.key;
				
				if(keyName == " " &amp;&amp; playingnow == false){
					$(audioElement).trigger('play');
					$(currentlyPlaying).html(songs[current]).fadeIn(fadeDuriation);
					playingnow = true;
				
				}else if(keyName == " " &amp;&amp; playingnow == true){
					$(audioElement).trigger('pause');
					$(currentlyPlaying).fadeOut(fadeDuriation);
					playingnow = false;
				
				}
				if(keyName == "."){
					next();
				}
				if(keyName == ","){
					back();
				}
			});
</code></pre>
<p dir="auto">I have added this code to the mm-music player.js  and it now accepts key presses</p>
]]></description><link>https://forum.magicmirror.builders/post/30655</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/30655</guid><dc:creator><![CDATA[Milk]]></dc:creator><pubDate>Fri, 03 Nov 2017 20:23:21 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 30 Oct 2017 17:19:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/milk" aria-label="Profile: Milk">@<bdi>Milk</bdi></a><br />
I use the built-in Monitor’s hard buttons to control the sound.<br />
There’s “alsamixer” command to control volume. But this is not convenient.</p>
]]></description><link>https://forum.magicmirror.builders/post/30387</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/30387</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Mon, 30 Oct 2017 17:19:41 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Sun, 29 Oct 2017 21:18:05 GMT]]></title><description><![CDATA[<p dir="auto">would it be possible to make it so I could use a keyboard to control the music?</p>
]]></description><link>https://forum.magicmirror.builders/post/30303</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/30303</guid><dc:creator><![CDATA[Milk]]></dc:creator><pubDate>Sun, 29 Oct 2017 21:18:05 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Wed, 18 Oct 2017 07:14:06 GMT]]></title><description><![CDATA[<p dir="auto">no, I’m a noob in this. You should take a look at the files of MMM-TouchPlayerBasic, and try to enderstand how the volume is managed. Good luck!</p>
]]></description><link>https://forum.magicmirror.builders/post/29738</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29738</guid><dc:creator><![CDATA[DrCastor]]></dc:creator><pubDate>Wed, 18 Oct 2017 07:14:06 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Tue, 17 Oct 2017 17:49:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/drcastor" aria-label="Profile: DrCastor">@<bdi>DrCastor</bdi></a></p>
<p dir="auto">Last question.<br />
Do you know how to  write a code for a volume buttons for that player?<br />
I know that “MMM-TouchPlayerBasic” module has that feature.</p>
]]></description><link>https://forum.magicmirror.builders/post/29696</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29696</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Tue, 17 Oct 2017 17:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Tue, 17 Oct 2017 15:01:51 GMT]]></title><description><![CDATA[<p dir="auto">Happy to have helped you :). It is sad that just for a problem of syntax, the source file was never edited :$</p>
]]></description><link>https://forum.magicmirror.builders/post/29694</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29694</guid><dc:creator><![CDATA[DrCastor]]></dc:creator><pubDate>Tue, 17 Oct 2017 15:01:51 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Tue, 17 Oct 2017 14:56:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/drcastor" aria-label="Profile: DrCastor">@<bdi>DrCastor</bdi></a><br />
Manay thanks!<br />
Resolved.</p>
]]></description><link>https://forum.magicmirror.builders/post/29693</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29693</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Tue, 17 Oct 2017 14:56:29 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 16 Oct 2017 18:42:48 GMT]]></title><description><![CDATA[<p dir="auto">It seems that I don’t have enough priviledges for uploading a file directly in this reply, and I don’t really want to provide you a link to some uploading site, since I don’t know if it is allowed in the rules of this site. I’ll try to find a way.</p>
<p dir="auto">Since then, just try what I told you. You juste have to cut and paste what I wrote. I’m sure you can do it, be confident in yourself ;)</p>
]]></description><link>https://forum.magicmirror.builders/post/29670</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29670</guid><dc:creator><![CDATA[DrCastor]]></dc:creator><pubDate>Mon, 16 Oct 2017 18:42:48 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 16 Oct 2017 19:42:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/drcastor" aria-label="Profile: DrCastor">@<bdi>DrCastor</bdi></a> said in <a href="/post/29662">Simple Music Player Module</a>:</p>
<blockquote></blockquote>
<p dir="auto">Hi,<br />
Could you please send a full code of “node_helper.js” file?<br />
Thanks in advance,</p>
]]></description><link>https://forum.magicmirror.builders/post/29663</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29663</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Mon, 16 Oct 2017 19:42:56 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 16 Oct 2017 19:42:40 GMT]]></title><description><![CDATA[<p dir="auto">Ok, found bad speakers, but at least, they allow me to test it. It works :). I’m a real noob, so some useless things may still be there. But at least, it will do the trick</p>
<p dir="auto">Go to the node_helper.js file, and change it this way:</p>
<pre><code>var Class = require("../../js/class.js");
var express = require("express");
var path = require("path");


module.exports = NodeHelper.create({

	init: function() {
		console.log("Initializing mm-music-player module helper ...");
	},

	start: function() {
		this.expressApp.get('/music', function (req, res) {
			var fs = require('fs');
			var path = require('path');

			var files = [];

			fs.readdir('modules/mm-music-player/music', (err, data) =&gt; {
				for(i = 0; i &lt; data.length; i++){
					if(path.extname(data[i]) == ".mp3"){
						files.push(data[i]);
					}
				}
				
				res.send(files);
			});
		});
	},



	/* setExpressApp(app)
	 * Sets the express app object for this module.
	 * This allows you to host files from the created webserver.
	 *
	 * argument app Express app - The Express app object.
	 */
	setExpressApp: function(app) {
		this.expressApp = app;

		var publicPath = this.path + "/public";
		app.use("/" + this.name, express.static(publicPath));
	},

});
</code></pre>
<p dir="auto">If luck is by your side, it will work ;)</p>
]]></description><link>https://forum.magicmirror.builders/post/29662</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29662</guid><dc:creator><![CDATA[DrCastor]]></dc:creator><pubDate>Mon, 16 Oct 2017 19:42:40 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 16 Oct 2017 16:19:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/drcastor" aria-label="Profile: DrCastor">@<bdi>DrCastor</bdi></a><br />
Great! Thank you for reply. I hope you will succeed.</p>
]]></description><link>https://forum.magicmirror.builders/post/29659</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29659</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Mon, 16 Oct 2017 16:19:24 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 16 Oct 2017 16:15:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi aro28,</p>
<p dir="auto">I had the same problem, so I decided to take a look at why this module couldn’t be loaded.</p>
<p dir="auto">The issues is in the Node_Helper.js given, which is mistaken. The structure is wrong. It looks like a quick adaptation of a ctrl+C/ctrl+V made from index.js, found in the node_helper folder (MM core folders).</p>
<p dir="auto">I’m actually tweeking it a bit. I’ll give you news when i get it worked nicely.<br />
(In fact, it seems i can now load it, but since my speaker are broke, i cant be sure it reads files… I’ll change them tomorrow)</p>
]]></description><link>https://forum.magicmirror.builders/post/29657</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29657</guid><dc:creator><![CDATA[DrCastor]]></dc:creator><pubDate>Mon, 16 Oct 2017 16:15:38 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Sat, 14 Oct 2017 19:19:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi Eof,<br />
Do you know why mm-music-player module is not loading even i added below code to config file? I downloaded and copied mm-music-player folder to MM’s Modules folder. Do i need to do something else?</p>
<p dir="auto">{<br />
module: ‘mm-music-player’,<br />
position: ‘bottom_left’,<br />
config: {<br />
startingVolume: 20,<br />
fadeDuriation: 2000<br />
}<br />
}</p>
<p dir="auto">Thank you!</p>
]]></description><link>https://forum.magicmirror.builders/post/29562</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/29562</guid><dc:creator><![CDATA[aro28]]></dc:creator><pubDate>Sat, 14 Oct 2017 19:19:34 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 20 Mar 2017 10:43:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> Is that “show list” already available?</p>
]]></description><link>https://forum.magicmirror.builders/post/17900</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/17900</guid><dc:creator><![CDATA[Preve]]></dc:creator><pubDate>Mon, 20 Mar 2017 10:43:12 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Thu, 16 Feb 2017 22:28:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dbaler" aria-label="Profile: dbaler">@<bdi>dbaler</bdi></a> If you are not using the default Music folder you could actually mount your network folder directly in that folder. No need to alter anything in the js files</p>
<p dir="auto">Here is a easy to follow tutorial on how you mount a smb share in linux :<br />
<a href="https://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.howtogeek.com/176471/how-to-share-files-between-windows-and-linux/</a></p>
]]></description><link>https://forum.magicmirror.builders/post/14735</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/14735</guid><dc:creator><![CDATA[broberg]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:28:46 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Thu, 16 Feb 2017 22:08:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/broberg" aria-label="Profile: broberg">@<bdi>broberg</bdi></a> Just change the directory in which JS file?</p>
]]></description><link>https://forum.magicmirror.builders/post/14732</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/14732</guid><dc:creator><![CDATA[dbaler]]></dc:creator><pubDate>Thu, 16 Feb 2017 22:08:54 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Thu, 16 Feb 2017 21:30:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dbaler" aria-label="Profile: dbaler">@<bdi>dbaler</bdi></a> My higly noobish answer is Samba, and mount a network folder.</p>
]]></description><link>https://forum.magicmirror.builders/post/14727</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/14727</guid><dc:creator><![CDATA[broberg]]></dc:creator><pubDate>Thu, 16 Feb 2017 21:30:14 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Thu, 16 Feb 2017 20:53:16 GMT]]></title><description><![CDATA[<p dir="auto">If you have a nas / networked storage and want to use music files from there, how would you do that?</p>
]]></description><link>https://forum.magicmirror.builders/post/14723</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/14723</guid><dc:creator><![CDATA[dbaler]]></dc:creator><pubDate>Thu, 16 Feb 2017 20:53:16 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Mon, 06 Feb 2017 10:19:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lucallmon" aria-label="Profile: lucallmon">@<bdi>lucallmon</bdi></a> either you change the directory in the players .js file or you link the music folder to the thumbdrive</p>
]]></description><link>https://forum.magicmirror.builders/post/13744</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13744</guid><dc:creator><![CDATA[broberg]]></dc:creator><pubDate>Mon, 06 Feb 2017 10:19:52 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Sun, 05 Feb 2017 20:22:52 GMT]]></title><description><![CDATA[<p dir="auto">Is there a way to link the music directory to a thumb drive instead of having it in the modules folder on the SD card?</p>
]]></description><link>https://forum.magicmirror.builders/post/13708</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13708</guid><dc:creator><![CDATA[lucallmon]]></dc:creator><pubDate>Sun, 05 Feb 2017 20:22:52 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Tue, 31 Jan 2017 14:30:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/theusu5k" aria-label="Profile: theusu5k">@<bdi>theusu5k</bdi></a> Yeah, Google Music would be a bomb widget on here.</p>
]]></description><link>https://forum.magicmirror.builders/post/13157</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13157</guid><dc:creator><![CDATA[1m2]]></dc:creator><pubDate>Tue, 31 Jan 2017 14:30:24 GMT</pubDate></item><item><title><![CDATA[Reply to Simple Music Player Module on Tue, 31 Jan 2017 14:29:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cowboysdude" aria-label="Profile: cowboysdude">@<bdi>cowboysdude</bdi></a> well, he should be able to send http get to the syslog module and then let the syslog send a notification to the player module.</p>
<p dir="auto">But, well, it’s a long way around 😀</p>
]]></description><link>https://forum.magicmirror.builders/post/13156</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/13156</guid><dc:creator><![CDATA[broberg]]></dc:creator><pubDate>Tue, 31 Jan 2017 14:29:41 GMT</pubDate></item></channel></rss>