AgP42/MMM-iFrame-Ping

How to specify multiple URLs?

Closed this issue · 8 comments

This module purports to suppport rotating iFrame contents, and the documentation references the url parameter as "the URL(s) in the iFrame", suggesting that multiple urls are possible.

No example or documentation is provided to show how to apply multiple urls. A comma deliminated list, and an array have been tried but then ping fails.

This module would be great if I could actually rotate through urls!

No such option available in this module, you can use MMM-iFrame for rotating URLs

Thanks. I was thrown off by the documentation that said

  • "Module for MagicMirror² that allow to display an iFrame of (m)any web content to your MagicMirror² ", and
  • url | the URL(s) in the iFrame

Closed as not-relevant

AgP42 commented

Hello,
thanks theramez for your perfect answer.
Gavin-McLeod, I will change the readme file to avoid any confusion.

Bye,
AgP42

Hello,
thanks theramez for your perfect answer.
Gavin-McLeod, I will change the readme file to avoid any confusion.

Bye,
AgP42

many thanks AgP42 for this great module...I've a small tutorial on how to add a full YouTube playlist instead of only one video "as readme suggest" it even can be a full live streaming list so we can watch NASA earth live in our mirror or even having a full list of favorite live channels!...should i post it here and you update readme file? if you're interested of course :)

AgP42 commented

Great, with pleasure !
You can either post it here and I will update the readme file, or directly update the readme and propose your modification as a "pull request". Do what is the easiest for you. :-)

Great, with pleasure !
You can either post it here and I will update the readme file, or directly update the readme and propose your modification as a "pull request". Do what is the easiest for you. :-)

thanks, I'll post it here so you can customize it in readme at your own :)

firstly go to the first video in any playlist, Right click and choose Copy embed code as seen here
1

now paste it anywhere it should be like that
<iframe width="853" height="480" src="https://www.youtube.com/embed/XMIc4uTAMh0?list=PLbIZ6k-SE9ShGEZ_wuvG3hatiC6jWJgVm" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

we only need the source src part so copy this part only, it should be like that
https://www.youtube.com/embed/XMIc4uTAMh0?list=PLbIZ6k-SE9ShGEZ_wuvG3hatiC6jWJgVm

copy this link to the module url: in config.js file and voila! you've a full playlist in your mirror... but wait a minute videos is not auto playable and i want to add a shuffle! also what happens when the list play is finished? here comes the fun part (^_^) you can simply add tags called YouTube player parameters within your link just like that link&TAG
so in our example to enable autoplay add tag:

autoplay=1

so our link will be
https://www.youtube.com/embed/XMIc4uTAMh0?list=PLbIZ6k-SE9ShGEZ_wuvG3hatiC6jWJgVm&autoplay=1

you can add multiple tags like link&TAG1&TAG2&TAG3
to enable list repeating add tag

loop=1

to remove the YouTube logo from the control bar add

modestbranding=1

to disable videos annotations add

iv_load_policy=3

Small hint: you can test your link in the browser easily just open a new tab and paste it to see how it will be exactly at the mirror

so we'll edit our link to make it autoplayable and disable annoying annotations and remove YouTube logo
https://www.youtube.com/embed/XMIc4uTAMh0?list=PLbIZ6k-SE9ShGEZ_wuvG3hatiC6jWJgVm&autoplay=1&modestbranding=1&iv_load_policy=3

wanna edit the YouTube player more! here is the full list of tags in The Official YouTube API page under Supported Parameters table
you can even disable keyboard inputs to the player, add

disablekb=1

or disable the player controls completely for more clean look, add

controls=0

Same way you can make your own list "requires a youtube account!" and paste your link to the mirror then change list contents adding videos, removing others, adding live channels and broadcasts..etc using your mobile or desktop without changing anything to the mirror and it'll be updated automatically 🥇

AgP42 commented

Many many thanks @theramez, this is a great tip !

the readme file is updated, I slightly update some text, ok for you ?

The tip to display your own playlist that can be updated directly from your YouTube account without any Mirror configuration change is really great !