Music Player possible?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
poliks
Posts: 15
Joined: Mon Jul 01, 2013 8:00 am

Music Player possible?

Post by poliks » Fri Feb 07, 2014 10:52 am

Hi All,

Having fun with Livecode so far. Next project is a Music Player.

Overview is simple. Standardise music across different offices by pushing out a player app that only contains approved music.

Here is my concern.

I have read somewhere on the forum that Livecode does not support background playing of audio. Is that still the case? Which means my music only plays if the iPad is stuck on the app. If it sleeps then audio is stops as well? Need more insight from the Gurus here.

Thank You!!

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Music Player possible?

Post by endernafi » Fri Feb 07, 2014 1:25 pm

Hi Poliks,

You may want to check this:
http://mergext.com/home/mergbgtask/


Best,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Music Player possible?

Post by Jellicle » Fri Feb 07, 2014 1:47 pm

You need to hack the plist to prevent the app quitting when it is suspended. I've provided instruction for that somewhere on here, I think. In my phone right now so I'm reluctant to type them all out again...but a search might turn it up.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Music Player possible?

Post by Jellicle » Fri Feb 07, 2014 1:49 pm

14" MacBook Pro
Former LiveCode developer.
Now recovering.

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Music Player possible?

Post by endernafi » Fri Feb 07, 2014 2:16 pm

Gerry,

It's not the same thing.
Your method is excellent to revive the app to its previous state,
but the app won't continue many tasks like playing music if it's in background.

Just tested it via both mobilePlaySoundOnChannel and creating a mobilePlayer.
The sound stops when the app enters background and continues from where it left off when opened again.

Best,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Music Player possible?

Post by Jellicle » Fri Feb 07, 2014 9:12 pm

Yeah sorry, it was almost midnight and I wasn't thinking straight :). You also need to add this to the plist:

<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

poliks
Posts: 15
Joined: Mon Jul 01, 2013 8:00 am

Re: Music Player possible?

Post by poliks » Thu Feb 13, 2014 8:22 am

Thanks,

Let me work on this and give my feedback if it works on my end.

P

Post Reply