On the ResponsiveVoice.JS website under the quirks section it states:
iOS TTS can’t be triggered without a direct user interaction, ResponsiveVoice JS resolves this
But, for the life of me, I can't get around this direct user interaction requirement. How do you get around this?
Here is the code snippet I'm trying to execute without user interaction I currently have located in the <head>
element:
<script src="http://code.responsivevoice.org/responsivevoice.js"></script>
<script type="text/javascript">
function speak_static_data(){
responsiveVoice.speak('Test');
}
setTimeout(function(){ speak_static_data(); }, 3000);
</script>
I would like to call responsiveVoice.speak('Test');
on page load in iOS without direct user interaction. How would I do this?
This same code snippet speaks fine on Android/Safari on desktop/Chrome on desktop but not in iOS.