As evident from the evolution of my first iOS app: My Day Todos ; it started off as being a pure Html5 app until it turned into a native iOS app with Html5 powered UI. The app has a very significant text to speech component and before using native iOS API for it i.e. AvSpeechSynthesizer , the text to speech component was powered by the Web Speech API . I will not be talking about why I switched the AvSpeechSynthesizer but rather a little problem that I had to solve while working with the web speech API. Problem: Show a stop button only when an utterance is being spoken So firstly, I think the Web Speech API is a lot of fun to play with and if you like to know more about it, you can either have a read of the spec or do this tutorial to get a feel of how it all works. Also when I talk about the web speech API, I am only talking about speech synthesis. All right, so what I wanted in my app was to show a stop button when the app is speaking i.e. reading out so...
Captain Danko’s JavaScript Lab — Tutorials, Frameworks & Front-End Mastery