Hello,
I have LiveCode Community 6.5.2 and try to run a mp4 video in the Android Emulator over an URL from a website.
I have created an empty Stack window and inserted following code which should play the video:
on openCard
mobileControlCreate "player", "movie"
put the result into sPlayerID
mobileControlSet sPlayerID, "showController", true
mobileControlSet sPlayerID, "h t t p : / / clips . vorwaerts-gmbh . de / big_buck_bunny . mp4", tMoviePath
mobileControlDo sPlayerID, "play"
end openCard
I have activated Internet in the Android Standalone Application Settings.
When I deploy to the emulator which runs Android 4.2.2 then I only get a white screen and the controller is also not showing up.
Does anybody know where the problem could be located?
Thanks,
Chris
Can't get Android Mediaplayer to work
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Can't get Android Mediaplayer to work
Hi Chirs,
try this:
...
mobileControlSet sPlayerID, "filename", "h t t p : / / clips . vorwaerts-gmbh . de / big_buck_bunny . mp4"
...
Best
Klaus
try this:
...
mobileControlSet sPlayerID, "filename", "h t t p : / / clips . vorwaerts-gmbh . de / big_buck_bunny . mp4"
...

Best
Klaus
Re: Can't get Android Mediaplayer to work
Showing the player and setting a rect is a must as well-
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
Code: Select all
local sPlayerID
on openCard
mobileControlCreate "player", "movie"
put the result into sPlayerID
mobileControlSet sPlayerID, "rect", "0,0,320,240"
mobileControlSet sPlayerID, "visible", true
mobileControlSet sPlayerID, "showController", true
mobileControlSet sPlayerID, "filename","http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
mobileControlDo sPlayerID, "play"
end openCard
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
-
Re: Can't get Android Mediaplayer to work
Thanks for the fast reply. The posted code works works perfectly.
Kind regards,
Chris
Kind regards,
Chris