For now, its not possible to toggle the browsers full screen mode in a self-implemented voice command since chrome reports this error:
> Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.
But actually, telling the browser "go to fullscreen" is kinda user gesture. What do you think about this? Should there a possibility to create new Instance of webkitSpeechRecognition with the right, to call webkitRequestFullscreen somewhen in its context?
Code:
var s = new webkitSpeechRecognition();
s.onresult = function (event) {
console.log('user told us to "enter fullscreen"');
document.body.webkitRequestFullscreen();
};
s.start();
Links:
*
*
https://developers.google.com/web/updates/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API