Read the statement by Michael Teeuw here.
Playing a local mp4 file as a module
-
@ramez I am noob on magic mirror
I am trying to set up something simple for my wife to use (WAF) but I can go deeper on the config
Any pointer really apreciated -
@remylpat great so first thing need to know is that your module will consist of 2 files the
YOUR_MODULE_NAME.js
andnode_helper.js
and maybe third file calledYOUR_MODULE_NAME.css
, The short brief description of thoses files is:1-
your_module_name.js
file builds you module and communicate with other modules “like alerts and voice commands module…etc”
2-node_helper.js
file communicate with OS itself "where you would ask it to play MP4 files or songs or send and Email or even shutdown the whole system!
3-your_module_name.css
builds the shape of your module and how it look like on the mirror “I think you don’t really need it as your module idea is to take an alert or command from other modules then run omxplayer or vlc”Excuse me I don’t know what is WAF? also do you run your mirror with voice commands? I mean how you really wanna to play the MP4 file by telling the mirror or setting it to play at exact time in the day? or even play it when the weather becomes raining! and the most important question…do you’ve time to read :) here is The full desc. on how to make a module if you’re lazy like me :D so here is a great module MMM-voiceradio that you can simply edit it to best suite your needs, so it’s main
MMM-Myvoiceradio.js
just take a command (which is called a notification in our mirror) from voice module and pass it to thenode_helper.js
to run some system files, what you need to edit here is the notification that make your module intialized and the exec command to play your file.Do some progress I’m waiting for your next question (^_^)
-
@ramez Thx a lot.
I’ll play with that later today and let you know.
Just to let you know I am building the smart mirror in order to have it as an Advertisement mirror and I would like to trigger by myself some video through a remote or button on it.
I’ll try your recommandations and let you know where I land :-)WAF : Woman Acceptance Factor (the most important thing that drive your life :-)
-
WAF : Woman Acceptance Factor (the most important thing that drive your life :-)
Ha! Great!
Isn’t there already at least one video player module out?
Can’t you use that one for your purpose.
Have a look into the 3rd party modules section at the MM github site. -
@remylpat nice, you may have to check those 2 modules MMM-Buttons and capacitve touch buttons fork
-
Are you wanting something to play a single mp4 file or several (like in a playlist) or to be given a choice to play from of a list of files stored in a local directory?
-
@justjim1220 said in Playing a local mp4 file as a module:
g something to play a single mp4 file or several (like in a playlist) or to be given a choice to play from of a list of files stored in a local directory?
My target is having like 5 files and 1 button per file to launch each of them.
I want mirror to diplay a video when I click on a remote then back to normal state (no video / minimal display) then click again (on another button for example) and the other video launch.
The mirror is to be used on a shop like a haircut -
I think I can work out something. might take me a few days to get it done, but I should be able to come up with something.
-
Are one of these modules that you are planning to use for the buttons?
https://github.com/ptrbld/MMM-Button
https://github.com/Jopyth/MMM-Buttons
https://github.com/tosti007/MMM-TouchNavigation -