speech synthesis - Forced to browser-sniff Safari version -


can tell me "best" way detect safari , version number?

look, don't want can't find way pin down working version of speechsynthesis on safari

see below example works on ios 7.1.2 if don't add onend listener. apart peachy.

in real world full blown example talks still won't deliver @ end event.

on ios 8 there no issue.

please offer best-of-breed agent/version sniffer or better working-feature-detector.

<!doctype html> <html> <head> <script type="text/javascript"> function fini() {     alert("end"); } function talk() {     if (!('speechsynthesis' in window)) {         alert("unsupported browser");         return;     }      alert("getting ready.");     var utterance = "hello world";     var chat = new speechsynthesisutterance(utterance);      chat.addeventlistener('end', fini, false);      speechsynthesis.speak(chat);  } </script> </head> <body>  <p>on safari example won't fire known events<br /> onend, onerror, onended: -</p>  <input type="button" value="talk" onclick="talk()" /> <br /><br /> no probs on chrome or opera. spewin! </body> </html> 

for record, addeventlistener throwing exception on 7.2.1 trapped signify unsupported speech synthesis.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -