views:

296

answers:

1

I'm trying, unsuccessfully, to get the MPMoviePlayerController to play movies silently if the ring/silent switch on the iPhone is set to silent. There are no interface methods to help me out nor does the player respect the AudioSessionProperty() trick:

UInt32 sessionCategory = kAudioSessionCategory_AmbientSound;

AudioSessionInitialize(NULL, NULL, NULL, NULL);

AudioSessionSetProperty(
    kAudioSessionProperty_AudioCategory,
    sizeof (sessionCategory),
    &sessionCategory);

Has anyone had any success silencing movie playback?

+1  A: 

I spent some time trying to get this to work myself. Eventually I gave up after trying, failing and reading this post on the apple dev forums.

"The MPMoviePlayerController establishes its own audio session and there is nothing you can do to affect this"

Cargowire