Page 1 of 1

show video preview freeze frame

Posted: Thu May 26, 2016 5:53 pm
by jim1001
I have the following code which plays a video fine. However the screen appears black before play is pressed. Is there an easy way to show a freeze frame from the video before play starts?

My application will be playing hundreds of videos, many of which may be added by the user after the app is installed, so some way of automating the process will be required.

Code: Select all

mobileControlCreate "player", "movie"
   put the result into sPlayerID
   mobileControlSet sPlayerID, "rect", "0,70,380,450"
   mobileControlSet sPlayerID, "visible", true
   mobileControlSet sPlayerID, "showController", true
   mobileControlSet sPlayerID, "filename", "/sdcard/movies/carFactory.webm"


Any help appreciated.

Many thanks,
Jim

Re: show video preview freeze frame

Posted: Thu May 26, 2016 6:11 pm
by jim1001
Did it! Used

mobileControlSet sPlayerID, "currentTime", 10000

Thanks.

Re: show video preview freeze frame

Posted: Thu May 26, 2016 6:16 pm
by jim1001
...just to explain, the first frame of the video must have been blank so advancing the time to a non-blank frame was needed. I used 10000 (time in milliseconds) in my test just to make sure I'd see something. Found the answer under mobileControlSet in the LC dictionary.

Cheers,
Jim