Discussion Forums  >  WebViews and HTML for Mobile

Replies: 1    Views: 102

JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
10/14/13 06:04 AM (10 years ago)

HTML Docs and Sounds (Auto play) in iOS

Similar but different to my last post in this forum section, I have an issue with automatically playing sounds when loading a HTML doc in an iOS project. Simple project again of a menu button linking to HTML doc stored locally (and referenced correctly) in the build. The HTML doc loads an image and *should* play a little sound (a 1 second ping, if you will) on loading. The HTML doc includes javascript which turns it into a slider. Every time a new image is loaded, a new ping plays. The issue is this - the file is loading fine and all but the first image has the necessary ping attached to it. I.e. image, 2, 3, 4 etc all load fine and play their various pings. It's only the first image that doesn't! I can have a work around whereby the user presses a button (in the HTML) to start, but this isn't really ideal. Just to confirm, the HTML works fine in a browser (including the first ping) so I'm confident all of the files are referenced correctly. Any pointers gratefully received. Cheers!
 
JimmySaver
Aspiring developer
Profile
Posts: 187
Reg: Apr 09, 2012
location unknow...
5,870
like
10/16/13 11:36 AM (10 years ago)
If it's of any interest, the workaround for this was quite simple - I used background audio for the very first sound. When the user advances the screen, the second sound kicks in following the user's interaction. Simples. Kind of.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.