Skip to main content
September 6, 2011
Question

Detecting if media player is playing in the background.

  • September 6, 2011
  • 1 reply
  • 377 views

Hi,

I was wondering if it is possible to know if the system media player (ie: iPod on ios) is playing.

On iOS I would do something like that:

if ([[MPMusicPlayerController iPodMusicPlayer] playbackState] == MPMusicPlaybackStatePlaying) ...

That could be useful in a game for intance, to let the user play his own music instead of the game music.
I doubt it's possible, but hey it's worth asking.
This topic has been closed for replies.

1 reply

Adobe Employee
September 9, 2011

Currently, You cannot detect any sound being played in background. Although AIR apps do allow mixing i.e. any audio being played before an AIR app launch will continue playing.

-Varun