This module allows embedding of YouTube videos, either singly or as a list of YouTube video IDs, or as a public YouTube playlist ID. The module uses the Electron webview tag rather than an iframe in an attempt to avert YouTube blocking the requested video for any of several reasons.
The webview tag is used to embed ‘guest’ content in the MagicMirror Electron app. The guest content is contained within the webview container. An embedded page within MagicMirror controls how the guest content is laid out and rendered.
Unlike an iframe, the webview runs in a separate process than MagicMirror. It doesn’t have the same permissions and all interactions between MagicMirror and embedded content will be asynchronous. This keeps MagicMirror safe from the embedded content.
Under the hood webview is implemented with Out-of-Process iframes (OOPIFs).
The webview tag is essentially a custom element using shadow DOM to wrap an
iframe element inside it. So the behavior of webview is very similar to a
cross-domain iframe. As such, it can be used to safely avoid cross-domain
policy restrictions that may prevent access to web content.
This module is based upon both the MMM-WebView module and the MMM-EmbedYoutube module with added functionality. There are some limitations to embedding with webview. These are detailed in the README. There may be a better way to do what I have done here. Possibly I should be using the Electron BrowserView instead. I would be open to suggestion. However, this release does accomplish what I set out to do - I can play my YouTube playlists and lists of YouTube videos without YouTube telling me the video is unavailable which is what I was seeing when using an iframe.
This is the initial release so I expect there will be significant changes in the near term. I’ve thoroughly tested it but expect issues will arise. The module is a work-in-progress and in active development.
I know this is super late but I was just messing around with it trying to get rid of the same line with the device playing, as you were. I figured it out, so I figured I might as well post it here since maybe you still want it, or others may want the info too.
You need to edit the file NPOS_DomBuilder that is located in the MMM-NotPlayingOnSpotify/core folder. Line 97 should say:
This is the line that displays the info we want to get rid of. You can probably just delete the line and save the file, or just comment it by putting // at the beginning of the line. Hope this helps someone.
@sdetweil yes you are right, I think I found the issue. Its not this module. There is something else on the pi hijacking my bandwidth! its insane ~ 24GB is last 24 hours!
I was about the do a clean install but then I thought I will just remove the unused folders first! I guess its from pocketshhinx or sphinxbase, I had installed some of those voice assistant modules! I removed those two folders and looks like now the data usage is back to normal. Will monitor for a day, if this doesnt help, will need to do a clean install
I created a stripped-down version of MMM-ShairportMetadata forked from surekap. This metadata module would be a drop-in replacement for the default compliment module. It can also display lyrics for apps (e.g. netease music, qq music, et al.) that support outputing lyrics to the title field of the metadata.
my MM has 2 speakers and a volume / on / off potentiometer button.
which module should I use to broadcast France Inter radio all the time that I would simply listen to by turning the potentiometer? Ideally, this module would also display the current show with a little info on the theme of the show.
0|MagicMirror | [04.04.2021 09:40.04.879] [ERROR]
0|MagicMirror | Whoops! There was an uncaught exception…
0|MagicMirror | [04.04.2021 09:40.04.974] [ERROR]
0|MagicMirror | SyntaxError: Unexpected token t in JSON at position 1311
0|MagicMirror | at JSON.parse ()
0|MagicMirror | at Class.start (/home/pi/MagicMirror/modules/MMM-Astro/node_helper.js:27:29)
0|MagicMirror | at /home/pi/MagicMirror/js/app.js:232:18
0|MagicMirror | at new Server (/home/pi/MagicMirror/js/server.js:93:3)
0|MagicMirror | at /home/pi/MagicMirror/js/app.js:226:20
0|MagicMirror | at loadNextModule (/home/pi/MagicMirror/js/app.js:171:5)
0|MagicMirror | at /home/pi/MagicMirror/js/app.js:166:6
0|MagicMirror | at Class.loaded (/home/pi/MagicMirror/js/node_helper.js:18:3)
0|MagicMirror | at loadModule (/home/pi/MagicMirror/js/app.js:143:6)
0|MagicMirror | at loadNextModule (/home/pi/MagicMirror/js/app.js:164:5)
@lavolp3 Are there any options within the custom.css.
I want to have the text on the left side. So i have choosen ‘top_left’ but the text spans till the middle.
I made a screenshot and want to have the text in the white boarders.