An impressive 4-part blog post by Nathan Weber from Digital Primates walking you step-by-step through the setup of an extension to sync the iOS native volume control on the device with the volume within the Adobe AIR application.

Changing the volume of a video while it’s playing in Flash is pretty easy, particularly if you’re using OSMF.  Just change MediaPlayer.volume, and if you’re running in a browser that’s it.  Sadly, when running on mobile that doesn’t produce the behavior that users are going to expect.

Both Android and iOS have a system wide media volume.  Pressing the hardware volume buttons while media is playing causes the media volume to be adjusted.  The volume is applied to the entire AIR application and overrides the volume of the AIR application.  This leads to a problem where the AIR application thinks that it is at full volume, but the system media volume is muted.  If you want to use a slider control in your application to control the audio (or have any sort of UI/logic that is based off of the volume) you’re in trouble as you will be representing the wrong volume. [via Digital Primates blog]

Read Nathan’s very detailed and interesting post for the solution.

Jens Loeffler

Author of Overdigital.net. The views/posts are my personal opinion.

http://www.overdigital.net

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

banner
Follow

Get every new post delivered to your Inbox

Join other followers: