Skip to content
This module loads a YouTube player and a specified playlist and will randomize the videos.
Branch: master
Clone or download
Latest commit a3e8325 Mar 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc.json updated Oct 5, 2018
.gitignore Add files via upload Jun 9, 2018
.stylelintrc updated Oct 5, 2018
Gruntfile.js updated Oct 5, 2018
MMM-RandomYouTubePlayer.js Update Mar 5, 2019
jsconfig.json Add files via upload Jun 9, 2018
node_helper.js updated Oct 5, 2018

Module: MMM-RandomYouTubePlayer...

The MMM-RandomYouTubePlayer module is a 3rd party module of the MagicMirror This module loads a YouTube player and a specified playlist and will randomize the videos.

Using the module...

To use this module, add it to the modules array in the 'config/config.js' file:

modules: [
	module: "MMM-RandomYouTubePlayer", 
	position: "top_center",	      // This can be any of the regions...
	config: {
	    playlistId: "PLl_KM23gznEAZW-INW8ty4QNaHH8JCnNW",     // See Configuration Options below...
            height: 480,
            width: 720,


cd ~/MagicMirror/modules
git clone

Optional parameters: (defaults for the player as is. change per your needs...)

autoplay: true,
disablekb: true,
enablejsapi: true,
color: "red",
fs: false, 
volume: "100%",
cc_load_policy: true,
controls: false,
showinfo: false, 
rel: false, 
modestbranding: true,
loop: true,

Configuration Options...

The following properties NEED to be configured:

Config Description
playlistId: " " Youtube playlist id to display. You can get it from youtube url
playlistId: PLl_KM23gznEAZW-INW8ty4QNaHH8JCnNW (playlist always starts with PL)
width: 480 YT player width
size in pixels per your need
height: 700 YT player height
size in pixels per your need

Optional Configuration Options...

The following properties CAN be configured:

Option Description
autoplay: true Autoplays video when it loaded
true OR false
volume: 75%: Sets the volume at a certain level when starting
1 to 100 %
color: "red" Player's video progress bar - color can only be "red" or "white
red or white
controls: true Show youtube video controls bar
true OR false
enablejsapi: true Enables the player to be controlled via IFrame API calls.
true OR false
disablekb: Disables keyboard control
true OR false
fs: false Displays the fullscreen button in player
true OR false
loop: true Auto-replays video again
true OR false
cc_load_policy: true Displays captions if available for the video playing
true OR false
modestbranding: false Prevents the Youtube logo from displaying in the controlbar.
true OR false
rel: true Shows related videos at the end of video
true OR false
showinfo: true Shows video title and uploader
true OR false


On my TODO list...

Known issues...

ONE... Player will only show a max of 200 videos loaded, but it will shuffle through the full playlist. My current playlist has approx. 1600 videos, and it shuffles through them all.

TWO... Player will shuffle the videos, but you will get repeats. (still working on this)


I used code snippets from the MMM-EmbedYouTube module by @nitpum
And from the MMM-YouTube-API by @C4TFLY
Thanks to them for giving me the snippets I needed to get started on this module!!!
And, I added my own snippets to complete the project!

I also want to thank @cowboysdude and @Mykle for their help as well! You guys are Awesome!!!

You can’t perform that action at this time.