Greetings
Would someone give me a hand to solve my problem with getting native ios player to play video from a URL?
I've tried this code:
on mouse up
mobileControlCreate "player", "videoControl"
mobileControlSet "videoControl", "filename", "my link"
mobileControlSet "videoControl", "preserveAspect", true
mobileControlSet "videoControl", "showController", true
mobileControlSet "videoControl", "visible", true
mobileControlSet "videoControl", "rect", "222,120,804,586"
mobileControlDo "videoControl", "play"
end mouse up
tried the same thing with **mobileControlSet "videoControl", "URL", ........**
tried to launch via creating browser, still didn't work. The only thing i get is a black square and nothing more.
However it works for me if I use code:
Launch url "......" so it runs via safari, but it's not what i want)
Thank you.
IOS Native player
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: IOS Native player
Hi pr1de,
The remote video needs some time to load, so if you do immediately, you'll get a black screen.
See the "loadState" property of the native player in the Dictionary.
You need to do something like:
Best,
Panos
--
The remote video needs some time to load, so if you do
Code: Select all
mobileControlDo "videoControl", "play"
See the "loadState" property of the native player in the Dictionary.
You need to do something like:
Code: Select all
on mouseUp
mobilecontrolcreate "player"
put the result into tempMovieID
mobilecontrolset tempMovieID, "rect", tRect
mobilecontrolset tempMovieID, "filename", tFilename
wait until mobileControlGet(tempMovieID,"loadstate") contains "playthrough"
mobilecontrolset tempMovieID, "visible", true
mobileControlDo tempMovieID, "play"
end mouseUp
Panos
--
Re: IOS Native player
Tried that as well. Nothing happens, black rect doesn't appear, seems like it waits for the video to upload but it takes ages......
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: IOS Native player
Hmm, maybe it is worth doing a after setting the filename.
Code: Select all
mobileControlDo "videoControl", "prepareToPlay"