MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. alexmann
    3. Best
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 10
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: A model that play a video or mp3 file from local drive, based on a Google Assistant command ?

      Well, Finally worked, :)
      here is my recipe for others to try

      var recipe = {
          transcriptionHooks: {
              "imBackHome": {
                  pattern: "I am back home",
                  command: "playVideo"
              }
          },
      
          commands: {
              "playVideo": {
                  shellExec: {
                  exec: "vlc --play-and-exit -f /path_to_file/modules/recipe/video1.mp4",
                      // This command will play the video using VLC.
                  }
              }
          }
      };
      
      exports.recipe = recipe;
      
      

      If you want the vlc to just play the video without exiting, just remove " --play-and-exit".

      Happy mirroring,

      posted in Development
      A
      alexmann
    • 1 / 1