1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

use shared voice components

This commit is contained in:
Luke Pulverenti 2016-07-06 15:25:58 -04:00
parent aece94029c
commit 07da989bfd
28 changed files with 413 additions and 185 deletions

View file

@ -75,6 +75,14 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
return deviceName;
}
function supportsVoiceInput() {
return window.SpeechRecognition ||
window.webkitSpeechRecognition ||
window.mozSpeechRecognition ||
window.oSpeechRecognition ||
window.msSpeechRecognition;
}
var appInfo;
var version = window.dashboardVersion || '3.0';
@ -96,6 +104,12 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
'sharing'
];
features.push('externallinks');
if (supportsVoiceInput()) {
features.push('voiceinput');
}
return features.indexOf(command.toLowerCase()) != -1;
},
appInfo: function () {