mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
28 lines
780 B
JavaScript
28 lines
780 B
JavaScript
define([], function () {
|
|
|
|
return {
|
|
|
|
isSupported: function () {
|
|
|
|
if (AppInfo.isNativeApp) {
|
|
// Crashes on some amazon devices
|
|
if (window.device && (device.platform || '').toLowerCase().indexOf('amazon') != -1) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return window.SpeechRecognition ||
|
|
window.webkitSpeechRecognition ||
|
|
window.mozSpeechRecognition ||
|
|
window.oSpeechRecognition ||
|
|
window.msSpeechRecognition;
|
|
},
|
|
|
|
startListening: function () {
|
|
require(['voice/voicedialog'], function (voicedialog) {
|
|
voicedialog.startListening();
|
|
});
|
|
}
|
|
};
|
|
|
|
}); |