• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Simple Music Player Module

Scheduled Pinned Locked Moved Entertainment
musicaudioplayer
41 Posts 19 Posters 44.0k Views 21 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    DrCastor
    last edited by Oct 18, 2017, 7:14 AM

    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!

    1 Reply Last reply Reply Quote 0
    • M Offline
      Milk
      last edited by Oct 29, 2017, 9:18 PM

      would it be possible to make it so I could use a keyboard to control the music?

      A 1 Reply Last reply Oct 30, 2017, 5:19 PM Reply Quote 0
      • A Offline
        aro28 @Milk
        last edited by Oct 30, 2017, 5:19 PM

        @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.

        1 Reply Last reply Reply Quote 0
        • M Offline
          Milk
          last edited by Nov 3, 2017, 8:23 PM

          			'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

          1 Reply Last reply Reply Quote 0
          • R Offline
            Rolandb
            last edited by Jan 22, 2018, 5:57 PM

            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.

            A 1 Reply Last reply Apr 7, 2018, 3:06 PM Reply Quote 0
            • A Offline
              aro28 @Rolandb
              last edited by Apr 7, 2018, 3:06 PM

              @Rolandb
              Hi, are you still facing the issue?

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 3
              • 4
              • 5
              • 4 / 5
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy