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:
parent
aece94029c
commit
07da989bfd
28 changed files with 413 additions and 185 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue