show video preview freeze frame

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

show video preview freeze frame

Post by jim1001 » Thu May 26, 2016 5:53 pm

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

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

Re: show video preview freeze frame

Post by jim1001 » Thu May 26, 2016 6:11 pm

Did it! Used

mobileControlSet sPlayerID, "currentTime", 10000

Thanks.

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

Re: show video preview freeze frame

Post by jim1001 » Thu May 26, 2016 6:16 pm

...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

Post Reply