Play audiofile from url to IOS

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
per_bodelius
Posts: 20
Joined: Mon Mar 19, 2018 11:25 pm

Play audiofile from url to IOS

Post by per_bodelius » Sat Apr 14, 2018 9:49 am

Hello again!
I am trying to play an audiofile on an Iphone from an url. Klaus suggested me to use the following code

put "h t t p://www.<my domain.s e>/matteapp/sound/math002.mp3" into sLink
mobilecontrolCreate "player","mplayer"
mobileControlSet "mplayer","rect","0,0,100,20"
mobileControlSet "mplayer","visible",TRUE
mobileControlSet "mplayer","showcontroller",TRUE
mobileControlSet "mplayer","filename",sLink
mobileControlDo "mplayer", "play"

but it don't work for me att all! I have tried different types of file format (aiff,mp3,wav) and different bitrates. I use LC Indy 8.1.9 (rc1) + Xcode 9.2 + MacOS 10.13.3.
Are there anyone who have succeeded in using "mobileControlSet" for streaming audio?
Another solution could be to preload the audio file, but how to do that?
/Best regards
Per B

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Play audiofile from url to IOS

Post by LiveCode_Panos » Sat Apr 14, 2018 11:00 pm

Hi per_b,

If the URL is not https it will be blocked by ATS on iOS. Try disabling ATS in the standalone application settings.

Best,
Panos.

per_bodelius
Posts: 20
Joined: Mon Mar 19, 2018 11:25 pm

Re: Play audiofile from url to IOS

Post by per_bodelius » Sun Apr 15, 2018 5:19 pm

Hello Panos,
Disabling ATS solved the problem! Thanks a lot Panos!!!

Best regards
Per Bodelius

Post Reply

Return to “Internet”