Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Listening external music or podcast while playing a Corona game
Started by david.ciaudo Jul 02 2019 08:43 AM

1 reply to this topic
music external podcast sound
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

david.ciaudo

[GLOBAL: userInfoPane.html]
david.ciaudo
  • Enthusiast

  • 51 posts
  • Corona SDK

Currently when an application like spotify is playing some music and you open a corona game, it cuts the music and let only the sound of your game, which is painfull as many players like to listen some music or podcast while playing especially during transports.

 

I've done some research and found an undocumented piece of code which not part of the official documentation:

if audio.supportsSessionProperty == true then
    print("supportsSessionProperty is true")
    audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)
end

But this code is not safe (undocumented), and the first launch of the app still cut the music. You can put app on suspend and the music comebacks and mix your game but this first start disable is kind of annoying.

 

Also I've noticed similar problem when playing an ads especially a rewarded video which cuts the external music on android for example.

 

Finally I found this old feature request:

 

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5416670-allow-external-music-audio-to-keep-playing-in-back

 

We are in 2019, any chance to see this feature implemented? I think it's a very important feature, especially when trying to make some hypercasual games where people may more willing to listening music or podcast while playing.



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

Corona is now open source, if someone in the community wants to take up this part of the code and flush it out, go for it. It's lot likely going to rise to our to-do list any time soon.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: music, external, podcast, sound