Skip to main content
1-Visitor
January 9, 2018
Question

Voice Commands Don't Trigger JS functions

  • January 9, 2018
  • 1 reply
  • 1891 views

I have a hololens project in Studio where i have a function setup in home.js called nextShell, which is at the $scope level. It changes a variable at the application level that is bound to a label each time it executes.

On the label I went to onClick and edited the js for it to say nextShell();

Preview, click the label, changes happen as I expected.

Okay great. Function works as intended. I now go into application events and create a new application event called NextShell, give it a voice alias of nextShell, voice response of Next Shell Type and, edit the js for the application event to be nextShell();, just like the onclick.

But for some reason when I say next shell I get the voice response but the JS doesn't seem to be occurring. the label doesn't change. Why is this? How do i fix it?

1 reply

Kilbride1-VisitorAuthor
1-Visitor
January 9, 2018

Found solution. the js for the voice commands needs a viewCtrl. added in front of the function names to find the right scope.