EXT‐YouTubeCast - bugsounet/MMM-Bugsounet GitHub Wiki
It allow to cast a YouTube video on MagicMirror²
This module is a plugin for MMM-Bugsounet
Screenshoot
Installing
Execute npm run setup:EXT-YouTubeCast
in the MMM-Bugsounet's folder.
cd ~/MagicMirror/modules/MMM-Bugsounet
npm run setup:EXT-YouTubeCast
electronOptions
MagicMirror 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,
...
Configuration
{
module: "MMM-Bugsounet/EXTs/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
}
},
Detailed configuration
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 |
Using
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
Developer Notes
Incoming notification:
Bugsounet_YOUTUBECAST-STOP
: Stop the video
Outgoing notification:
Bugsounet_YOUTUBECAST-CONNECTED
: When video startBugsounet_YOUTUBECAST-DISCONNECTED
: When Video end
When a video is playing:
This 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 use EXT_LOCKED
lockString