Page 1 of 1
Play Audio
Posted: Thu Dec 10, 2015 9:17 pm
by UKenGB
I want to be able to play MP3/AAC audio files on iOS, Android (and possibly OS X). I would have the path to the file and want to be able to play, pause, fast forward and rewind, i.e. just like a normal music player. What I have read indicates this might be a problem for LiveCode. Could someone enlighten me, is it possible to do this or do I need to throw LiveCode in the bin and look elsewhere?
Thanks.
Re: Play Audio
Posted: Thu Dec 10, 2015 9:41 pm
by Dixie
You can do what you want to do...

I have built an app that does just what you wish...

Under iOS I used the MPMoviePlayerControl.... You can 'play','Pause','Stop'... 'Seek Forward', 'Seek Backward'...
I didn't use the 'seeking' actions, but I can tell you they do work...

All the tracks are called and played from a server, no need to keep the tracks on the mobile device...
Re: Play Audio
Posted: Thu Dec 10, 2015 11:26 pm
by Klaus
Hi UKenGB,
1. welcome to the forum!
UKenGB wrote:What I have read indicates this might be a problem for LiveCode.
2. Where and what did you read?
Best
Klaus
Re: Play Audio
Posted: Fri Dec 11, 2015 10:04 am
by UKenGB
Klaus wrote:Hi UKenGB,
1. welcome to the forum!
UKenGB wrote:What I have read indicates this might be a problem for LiveCode.
2. Where and what did you read?
Klaus
I was searching the forums for '"audio" I think and saw several posts that indicated a problem. One I think said 'controls' were not available for mobile. I'm afraid I don't know now specifically which posts they were. Hard enough trying to find what I do want, let alone backtracking to find what mislead me.
I am very new to LiveCode, but want to construct an audio player for Android and iOS using music stored on an external USB HDD and internally, respectively. I have previously done a lot of 4G database development work with various front ends, but very little C or similar. I hoped LiveCode would be a good choice, but I'm sure it won't be easy and I'll have a lot of questions and so hope no one will mind my asking and will be prepared to help. Might as well start:-
Dixie uses the 'MPMoviePlayerControl'. What is a 'control'? Sorry if that sounds basic, but what does that signify in LiveCode speak. Working through the tutorials I've not come across this term, only when I started looking through the forums. Is this external code that you incorporate into the project somehow? Is there an equivalent music player control for Android?
To create an app for both, but with different 'controls' for each, would I therefore need my own code to select the appropriate control at run time, depending on which OS under which it is running?
Talking of tutorials, what is 'Revolution' and 'runRev' etc. A whole section of tutorials starts using these terms with no prior mention (that I could find) of what that is all about. I thought it was just an earlier version of the IDE, but it shows code using rev..... commends etc. What is 'Revolution' and how does it fit into the LiveCode universe?
Re: Play Audio
Posted: Fri Dec 11, 2015 7:08 pm
by ClipArtGuy
What you want to do is fairly simple in LiveCode, but you will need to learn the basics first. Here's a couple great resources:
http://livecode.byu.edu/indexgeneric.php
http://www.hyperactivesw.com/revscriptc ... ences.html
You will need a grasp on livecode basics before diving into mobile development, and you will probably hit a few stumbling blocks along the way, but it is definitely within the capabilities of LiveCode.
Re: Play Audio
Posted: Sat Dec 12, 2015 10:12 am
by jacque
RunRev and Revolution are the names for LiveCode and it's company before it was rebranded. They are the same product you're using now. Older documentation will use the name that was current back then.
Controls are all the parts and pieces you use to create a stack, basically everything in the tool palette. Buttons, fields, players, images, graphics, are all different types of controls. Sometimes they are also called objects.
Cards and stacks are not technically controls, they are containers that hold controls.
Do take a look at the scripting stacks, all the basics are in there.
Re: Play Audio
Posted: Mon Dec 14, 2015 3:42 pm
by UKenGB
I rather had the impression that the player controls being referred to were external modules of some sort. If it just means LiveCode's available controls, then I understand.
Like I said, early days yet. Only been playing with it for a couple of days, so plenty yet to learn. Looks like I'll end up needing music players for OS X, iOS and Android so Live Code does look like the best option.
What about TV-OS?
Re: Play Audio
Posted: Mon Dec 14, 2015 8:43 pm
by jacque
UKenGB wrote:I rather had the impression that the player controls being referred to were external modules of some sort. If it just means LiveCode's available controls, then I understand.
Ah. If the article you were reading is refering to player controls, then it means the controller bar that appears under the video or audio area. (The term usually is "controller".) When LC changed from using QuickTime to native players dependent on the OS, the OS did not provide a controller bar. To accomodate, LC created its own controller which it attaches to the OS player. So on desktop, you do get a controller.
On mobile, the player uses whatever is native to the mobile OS without any additions.
What about TV-OS?
No support for TV, at least not yet. I don't know if there are plans for it.
Re: Play Audio
Posted: Tue Dec 15, 2015 3:35 pm
by UKenGB
jacque wrote:UKenGB wrote:What about TV-OS?
No support for TV, at least not yet. I don't know if there are plans for it.
I see that as quite a big thing, to complete what LiveCode offers. Well, that and WatchOS I guess. But they're both just variations of iOS are they not, so I wouldn't have thought it would take too much effort. TV OS is certainly the direction I'd want to be looking in.