Hi, I'm writing a new EXT-YouTube module (version 2022 ?)
I now able to play any YouTube video without VLC program
We use the real YouTube API in Javascript
I see some user that think... we can't play © video with it...
Effectively, we can't read directly © video in embed iframe with full JS Code for MagicMirror !
So... I think to another method... we have an dedicated server... and why not create a YouTube server on it ?
Right! I Code it !
YouTube windows in rest
Youtube windows playing sample
This plugin is Reserved to Donators/Helpers/BetaTester Groups of @bugsounet's forum
There is some FreeDays for testing this module
FreeDays days is defined every month from 01 to 07
In other case/day, you can't use this module
This plugin is coded for working with
MMM-GoogleAssistant
For using with EXT-TelegramBot
For using with notifications with somes modules
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-YouTube
cd EXT-YouTube
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-YouTube",
position: "top_center", // optional (can be deleted if using fullscreen)
config: {
fullscreen: false,
width: "30vw",
height: "30vh",
useSearch: true,
alwaysDisplayed: true,
displayHeader: true,
username: null,
password: null
}
},
Field Type Default Description 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) useSearch boolean true activate YT search functionality (need YT.json token) alwaysDisplayed boolean true should the YouTube windows have to be always displayed when a video is not playing ? displayHeader boolean true display name of the video in header username string null username of the @bugsounet's support forum password string null The password sended by @bugsounet (It's not your password of the forum !)
MMM-GoogleAssistant
for vocal controlA prepared recipe is inclued and waiting for your use
Just add it in the config of MMM-GoogleAssistant
recipes: [
"../../EXT-YouTube/recipe/EXT-YouTube.js",
],
recipes: [
"my_recipe.js",
"../../EXT-YouTube/recipe/EXT-YouTube.js",
],
MMM-GoogleAssistant
Commands:Activate your assistant with your prefered keyword and try:
youtube <artist/Title>
: for search and display a video
youtube Michael jackson thriller
stop
: will stop any videoEXT-TelegramBot
Commands:You can control MMM-Youtube with TelegramBot
The main command is /youtube
EXT_YOUTUBE-PLAY <video ID>
: Start a wanted video IDEXT_YOUTUBE-STOP
: Stop the videoEXT_YOUTUBE-SEARCH <Artist / Title>
: for search after a title artist videoEXT_YOUTUBE-VOLUME_MIN
: set the volume to 10% of the YouTube PlayerEXT_YOUTUBE-VOLUME_MAX
: set the volume to 100% of the YouTube PlayerEXT_YOUTUBE-CONNECTED
: When video startEXT_YOUTUBE-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-YT_LOCKED
lockString
When you call assistant, Volume Control increase/decrease volume automatically
For displaying Video, this plugin use some resource on @bugsounet's server
That's why i limit traffic for this module
This module is limited to Donators/Helpers/BetaTester Groups
But there is some FreeDays for testing this module
FreeDays days is defined every month from 01 to 07In others days you need
credentials
(username and password) sended by @bugsounet
If you are in a needed group, just ask me to generate yourpassword
and place it in config fieldVolume Control is not available, if you don't have credentials
cd ~/MagicMirror/modules/EXT-YouTube
npm run update