is there a way to resume music in ios ?

I am using media.playSound and when the application is minimized or working in the background the music is stopped(that’s fine) but when the app is brought to front, music isn’t resumed! On android it’s working fine … is there anything that I need to do or that’s just how it runs on ios!

Thanks in advance

Hi @b0b_k,

The media.* library sound functions have some benefits on Android due to latency issues, but for iOS, it’s recommended that you use the audio.* library functions and methods. You can begin to explore these here:

http://docs.coronalabs.com/guide/media/audioSystem/index.html

If it’s too much trouble to use one library for Android and another for iOS, you might want to explore setting up a system state function (to monitor when the app is suspended and resumed) and then use media.pauseSound() upon suspend, and media.playSound() on resume.

Hope this helps,

Brent

Thanks @Brent Sorrentino,

Setting up a system state function was ideal.

~ b0b_k

Hi @b0b_k,

The media.* library sound functions have some benefits on Android due to latency issues, but for iOS, it’s recommended that you use the audio.* library functions and methods. You can begin to explore these here:

http://docs.coronalabs.com/guide/media/audioSystem/index.html

If it’s too much trouble to use one library for Android and another for iOS, you might want to explore setting up a system state function (to monitor when the app is suspended and resumed) and then use media.pauseSound() upon suspend, and media.playSound() on resume.

Hope this helps,

Brent

Thanks @Brent Sorrentino,

Setting up a system state function was ideal.

~ b0b_k