Android player controls disappear

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Android player controls disappear

Post by jim1001 » Thu Oct 12, 2017 1:59 pm

I’m playing some audio on Android using the mobileControlSet “player”. Yes, I know there are other ways of playing mobile audio but I’d like to get this way to work better.

I find that player controls disappear when the media has stopped playing leaving a black rectangle. Clicking on the black rectangle brings them back (with video, the video remains visible but the controls still disappear)

Is this well known & is there an elegant solution that may be more obvious to a user?

The best I have up to now is a button to the right of the player which when clicked does a

Code: Select all

mobileControlSet <playerID>, "showController", true
- this also brings the controls back.

I’ve tried handling the the playerFinished message on its card script with the above command but the message doesn’t seem to fire. (aside: the dictionary says playerFinished is for ios & android whereas playerStopped is only for ios)

Thanks for any replies.

Posts: 16
Joined: Thu Mar 22, 2018 6:24 pm

Re: Android player controls disappear

Post by Volkmar » Thu Mar 22, 2018 6:59 pm


I have a simular topic.

I put the player into the card of the livecode application.
Afterwards i try the function of the player in the LiveCode application and it is all ok.
If I create a standalone application "apk" for android. The player isn't shown and have also no function. Only the border of the player is shown.(see picture)

Do you know the mistake?

Thanks a lot

Posts: 11752
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany

Re: Android player controls disappear

Post by Klaus » Thu Mar 22, 2018 7:10 pm

Hallo Volkmar,

the answer is simple (as the Dictionary clearly shows, HINT, HINT):
PLAYER objects are not supported on iOS and Android!

Use something like this to play a video.
If you added the video in the standalone builder settings via the "Copy files" tab, you will find all these files and folder in -> specialfolderpath("resources")
put specialfolderpath("resources") & "/your video file here.mp4" into tVideoFile
play video tVideoFile

Or, the longer way, create a native videoplayer object on the fly with:
mobileControlCreate "player", "YourPlayer"
mobileControlSet "YourPlayer", "visible", true
## Check the video first to get its dimensions, you need to supply them here:
mobileControlSet "YourPlayer", "rect", "50,50,500,500"
mobileControlSet "YourPlayer", "filename",specialfolderpath("resources") & "/your video file here.mp4"
mobileControlDo "YourPlayer", "play"



Volkmar sounds german :-), if you ARE in fact german, we also have a german LC forum here: ... ode-forum/

Posts: 16
Joined: Thu Mar 22, 2018 6:24 pm

Re: Android player controls disappear

Post by Volkmar » Thu Mar 22, 2018 7:37 pm

Thanks a lot for the quick response :D

Post Reply

Return to “Bug Triage”