Page 1 of 1

Play audiofile from url to IOS

Posted: Sat Apr 14, 2018 9:49 am
by per_bodelius
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

Re: Play audiofile from url to IOS

Posted: Sat Apr 14, 2018 11:00 pm
by LiveCode_Panos
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.

Re: Play audiofile from url to IOS

Posted: Sun Apr 15, 2018 5:19 pm
by per_bodelius
Hello Panos,
Disabling ATS solved the problem! Thanks a lot Panos!!!

Best regards
Per Bodelius