I need help with allowing playback of music from other apps when my game is playing. In the past, this used to work with the following function:
local function keepPlayingAudio() print("keepPlaying is true") -- Set the audio mix mode to allow sounds from the app to mix with other sounds from the device if audio.supportsSessionProperty == true then print("supportsSessionProperty is true") audio.setSessionProperty(audio.OverrideMixWithOthers, audio.MediaPlaybackMixMode) end -- Store whether other audio is playing. It's important to do this once and store the result now, -- as referring to audio.OtherAudioIsPlaying later gives misleading results, since at that point -- the app itself may be playing audio isOtherAudioPlaying = false if audio.supportsSessionProperty == true then -- print("supportsSessionProperty is true") if not(audio.getSessionProperty(audio.OtherAudioIsPlaying) == 0) then print("OtherAudioIsPlaying is true") isOtherAudioPlaying = true end end end
The debug print lines are all firing on device, yet the music from the other app (iTunes) is interrupted. I found this:
And it seems there was no follow-up from the devs.