It allow to cast a YouTube video on MagicMirror
This module is an Extented for
MMM-GoogleAssistant
This module need
EXT-Alert
plugins to display any errors or informations on the screen
Clone the module into your MagicMirror module folder and execute npm intall
in the module's directory.
cd ~/MagicMirror/modules
git clone https://github.com/bugsounet/EXT-YouTubeCast
cd EXT-YouTubeCast
npm install
electronOptions
A new part of config is needed for displaying this module.
On the begining of MagicMirror config.js, modify with electronOptions
var config = {
address: "localhost",
electronOptions: {
webPreferences: {
webviewTag: true
}
},
port: 8080,
...
{
module: "EXT-YouTubeCast",
position: "top_center", // optional (can be deleted if using fullscreen)
config: {
debug: false,
fullscreen: false,
width: "30vw",
height: "30vh",
alwaysDisplayed: true,
castName: "MagicMirror",
port: 8569
}
},
Field Type Default Description debug boolean false enable or not debug mode fullscreen boolean false enable fullscreen video (default in windows) width string 30vw width of the your YouTube window (can be a px value too) height string 30vh heigth of the your YouTube window (can be a px value too) alwaysDisplayed boolean true should the YouTubeCast windows have to be always displayed when a video is not playing ? castName string MagicMirror name of the cast device port number 8569 port of the device
Just open YouTube (or YouTube Music) app on your phone/tablet or with the youtube website in a computer
Click on the cast icon and select your device name defined in module configuration
The video will be played on your mirror !
All devices must be in the same network
EXT_YOUTUBECAST-STOP
: Stop the videoEXT_YOUTUBECAST-CONNECTED
: When video startEXT_YOUTUBECAST-DISCONNECTED
: When Video endThis module will hide all modules when a video is playing in fullscreen
It's the better way to disable all modules to increase RPI performance
It will useEXT_LOCKED
lockString
cd ~/MagicMirror/modules/EXT-YouTubeCast
npm run update