Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

BUG: Streaming Sound Continues Playing When Silent Button Is Pressed

Sorry, simply ignore this (since there is no delete function)… of course this is a regular behaviour! Silent only works for call notifications not for sounds/music.

Original Post:
I have a streaming sound (played via Ti.Media.createAudioPlayer and allowBackground:true) that continues to play even when i set the iPhone to mute pressing the silent button… This is really strange since the silent button is a hardware event :) How come Titanium can bypass Hardware/Device events?

I'm using iOS4.1 and the 1.4.0 SDK.


— asked September 22nd 2010 by Lars Schwarz
  • bug
  • mobile
  • mute
  • osx
  • sound
  • stream

2 Answers

  • It's not a bug, it's normal behaviour. Go to the iPod on your iPhone and play music, switch the phone's silent switch to on and the music continues playing.

    — answered February 18th 2012 by Dallas Clark
  • Hi all, This is not true, is it? I told my client this, lol, and they came back and said that Angry Birds, etc. do respect the silent switch… Is this a bug or simply a Titanium thing that cannot be undone?

    — answered July 13th 2012 by Amy H
    • more research: https://developer.appcelerator.com/apidoc/mobile/1.3/Titanium.Media-module
      Looks like the AUDIO_SESSION_MODE_PLAYBACK property or the AUDIO_PLAY_AND_RECORD_MODE property sets the mode for this. It is default set to respect the phone's silent switch, but if you require either of these modes, it will not respect the silent switch.

      — commented July 13th 2012 by Amy H
    • it is not true that disrespecting the silent switch is just a normal part of behavior

      — commented July 13th 2012 by Amy H
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.