How to play music selected using mobilePickMedia?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
strongbow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 146
Joined: Mon Jul 31, 2006 1:39 am
Contact:

How to play music selected using mobilePickMedia?

Post by strongbow » Thu Dec 11, 2014 2:31 pm

I'm attempting to play some music on iPad after selecting it with mobilePickMedia.

Selecting it is fine and returns a line in the form:

ipod-library://item/item.mp3?id=-3639534672740601105

Now, later on I try to play this using mobilePlaySoundOnChannel but I get the error:

"could not play sound"

Anyone have a good idea why this is and if I need to somehow provide a different path or other for this command? The examples given in the docs use the "play" command but then there is this note below:

"Note: On iOS, mobilePickMedia returns references to the iTunes data store on the iOS device. These media references can only be played with the mobilePlaySoundOnChannel command."


Any ideas/pointers?

Thanks in advance!

Alan

strongbow
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 146
Joined: Mon Jul 31, 2006 1:39 am
Contact:

Re: How to play music selected using mobilePickMedia?

Post by strongbow » Thu Dec 11, 2014 3:23 pm

Well, it looks as if the docs are wrong again.

Success = using the "play" command, directly with the URI returned from mobilePickMedia.

However, I also want to pause and resume this particular sound, which is possible using the mobile specific channel commands but not, it appears, with this variant of the "play" command.

So, once again, any further ideas? Runrev support listening? Cheese?

cheers

Alan

Post Reply