modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
23 lines (22 loc) • 506 B
JavaScript
/*!
{
"property": "speechsynthesis",
"caniuse": "speech-synthesis",
"tags": ["input", "speech"],
"authors": ["Cătălin Mariș"],
"name": "Speech Synthesis API",
"notes": [{
"name": "W3C Spec",
"href": "https://w3c.github.io/speech-api/speechapi.html#tts-section"
}]
}
!*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('speechsynthesis', function() {
try {
return 'SpeechSynthesisUtterance' in window;
} catch (e) {
return false;
}
});
});