Music Sleep Mode

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mackus
Posts: 23
Joined: Thu Apr 22, 2010 12:17 am

Music Sleep Mode

Post by mackus » Thu Oct 27, 2011 12:35 am

Working on an app that plays a preset list of music files, preloaded when the app is compiled. When song is selected, it plays just fine until my 3 minute autolock on the iphone kicks in and the app music quietly shuts down in the sense that the audio music is no longer heard. Touching the screen brings up the passcode screen. After entering my passcode the app reappears and then continues play the music. Was wondering if it is possible to have the music continue even when the screen is off.

thx in advance

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Music Sleep Mode

Post by bn » Thu Oct 27, 2011 10:40 am

Hi mackus,

how do you play your music?

according to Jellicle in this lengthy thread:
http://forums.runrev.com/viewtopic.php? ... =75#p33328
Based on some advice from someone on the dev list I've started using the MPMoviePlayerController iOS control instead of the other methods. It keeps playing even when the display is put to sleep. As a bonus the user can scroll through the mp3 and manually stop and restart play. This replaces most of my sound play code, and is a much better solution.Awesome!
Maybe you try the MPMoviePlayerController. See iOS release notes for syntax.

Kind regards

Bernd

mackus
Posts: 23
Joined: Thu Apr 22, 2010 12:17 am

Re: Music Sleep Mode

Post by mackus » Thu Oct 27, 2011 6:32 pm

Thx Bernd. Just what I needed :D

Post Reply