Read the statement by Michael Teeuw here.
MMM-pages - how to know which page index my module has?
-
from my SampleModule.js
// system notification your module is being hidden // typically you would stop doing UI updates (getDom/updateDom) if the module is hidden suspend: function(){ }, // system notification your module is being unhidden/shown // typically you would resume doing UI updates (getDom/updateDom) if the module is shown resume: function(){ },
-
@evroom my MMM-SleepWake uses an external trigger to cause modules to be shown/hidden (screen saver where the screen won’t turn off)
I provide a commandline command to interact with the module…
i use a webcam with the motion project daemon to trigger show/hide -
@sdetweil
Yeah, this module is kind of in my foster care.
I did not come up with the code; only made some tweaks and made it available.
There is not suspend or resume to been seen in the code.But I will study the stuff you mentioned and will try to implement that.
Thx.
-
As a workaround, I will make it a requirement to put the MMM-Player on the first page (page index 0).
When I receive 0, then I will start streaming, otherwise I will stop streaming.
That seems to work. -
@sdetweil
Short question:There are 2 versions of MMM-pages:
https://github.com/edward-shen/MMM-pages
https://github.com/sdetweil/MMM-pagesThey seem in-sync, but which one would be the preferred one to take?
-
@evroom the core function is the same
i added the ability to have different page display timesi wrote the doc on the fixed page name approach
as you are using a notification now
just move that to suspend (same as index=0)
and the resume wakes you back up -
@sdetweil
He has the MMM-MPlayer working in pages and I am now using pages and MPlayer in my main MM.
Kinda of cool to be able to show a RSTP camera or 2 again… -
@plainbroke cool
-
@evroom said in MMM-pages - how to know which page index my module has?:
As a workaround, I will make it a requirement to put the MMM-Player on the first page (page index 0).
When I receive 0, then I will start streaming, otherwise I will stop streaming.
That seems to work.Hi
Trying to use the mmm-mplayer module with mmm-pages, and it works fine, as you say, when the page index is 0.
However, I’d like to use it to only show video when called via notification
I have a single main page (without mplayer) - that shows all the time - and a single hidden page (with mplayer) to be shown when called via notification and then return the the main page with another notification.
I can’t currently implement this. Any ideas?
Thanks very much
-
@mvrlogins why not? what triggers the notification??
button, command , …
you could prove this with the MMM-CommandtoNotification module