Recipe for mp4 or gif
-
Hi, i want to make a recipe that when i say “Ricardo” it plays a gif/mp4. i know that the command for a mp3 is sound exec, so in this case how should i fo it?
-
hi,
soundExec
is the validation sound when a recipe is executed
it’s not an mp3 player -
-
-
@bugsounet oh yeah, i understand.
in my code i am using vlc to open it, but i would like to know if there is a way to open it “inside” the magic mirror, without having to use an external app
my code is like this:
var recipe = { transcriptionHooks: { “ricardo”: { pattern: “ricardo ricardo ricardo”, command: “ricardo” }, } commands: { “ricardo”: { shellExec: { exec: “vlc -f file:///home/pi/MagicMirror/video/ricardo.mp4” } }, } } exports.recipe = recipe
Thanks
-
yes but you can’t close it
I have to do some test for compatibility with an Plugin for doing this
-
yes i can my friend. The vlc closes automatically after the video ends and returns to the magic mirror, also, if i want to close the video while it is still playing, i created a command “stop_vlc” for that. i just didn’t put it in here because i wasn’t home
Also if you have a recomendation of player to use instead of vlc i would appreciate, vlc is kinda slow
Good luck with that, love your work -
It’s already coded but I never try with local files
So, I prefer try by myself before posting the solution
Note: stop command will work natively with it
-
@bugsounet ugg, that’s nice!! looking forward to test it when it comes out