mobilcontrol and video aspect ratio

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
istech
Posts: 211
Joined: Thu Sep 19, 2013 10:08 am

mobilcontrol and video aspect ratio

Post by istech » Sat Jan 25, 2014 9:35 am

Hi all,

I hope someone can help. I have a video I want to play on a mobile device which is 1024x768. When I play it on the device it plays with two black bars on the left and the right.

Now I can change the aspect ratio on vlc to fit my screen. Is there a way to do it with native player on android and iphone?

I have tried setting the native video player to the rec of the stack/button but with no success I still get the black bars.

Is there something I am missing and can someone point me in the right direction?

Thanks all

ps. the video is only 5 seconds and I could break the video into frames and run it as a animation and it should work. But looking for the solution to videos in mobile.

code using:
put specialFolderPath("engine") & "/video/myVideo.m4a" into tVidFile
mobileControlCreate "player", "myPlayer"
put the result into sPlayerID -- save the control id

mobileControlSet sPlayerID, "filename", tVidFile
mobileControlSet sPlayerID, "visible", true
mobileControlSet sPlayerID, "rect", "x,y,x2,y2"##have tried various methods here. But still black bars.
mobileControlSet sPlayerID, "showController", true
mobileControlSet sPlayerID, "preserveAspect", true##and here

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: mobilcontrol and video aspect ratio

Post by Simon » Sat Jan 25, 2014 11:23 pm

Hi Istech,
Not really clear why you would change the aspect ratio unless it was incorrect to begin with. Everything will get short and fat. Oh well.
I would crop the top and bottom of the video to get it to fill the full screen. But then not all devices have the same ratio, so sooner or later the black bars will show up again. Oh well.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

istech
Posts: 211
Joined: Thu Sep 19, 2013 10:08 am

Re: mobilcontrol and video aspect ratio

Post by istech » Wed Jan 29, 2014 10:47 am

Thanks for the reply Simon.

In the end I ended up making a animation out of the video. It is easier for me to let livecode do the resizing.

Post Reply