External Video Link - Landscape Rotation

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

External Video Link - Landscape Rotation

Post by Tester2 » Tue Oct 18, 2011 12:51 am

I have an external video link playing in a Browser object on a card.

When I click the bottom right arrow icons to make the video play full screen, I want the ability to rotate my iPad to landscape (making the video larger).

But I cannot do this since my app is only a Portrait Mode app.

Is there something you can code either with the video link on the card that could make this possible?

Thanks bunches! ;)

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: External Video Link - Landscape Rotation

Post by FireWorx » Tue Oct 18, 2011 8:09 am

I am using the code below to switch IPAD orientations and maintain a working browser through the rotation. It works on google maps haven't tried it with video. I just grouped the controls on the card and named the group "landscape". Then copied the group and pasted it on the same card and rearranged the controls for portrait and named that group "portrait" They both share a browser that is full width full height minus 120 pixels room on the top for the controls. It seems to work pretty good. Hope this helps.
Dave

on resizeStack
global sBrowserId
if the width of this card < 1000 then ## must be portrait
hide group "landscape"
show group "portrait"
else
show group "landscape"
hide group "portrait"
end if
set the rect of group "Browser" to 0,120, the width of this card, the height of this card
set the rect of image 1 of group "Browser" to the rect of group "Browser"
if the environment is not "mobile" then exit resizeStack
iphoneControlSet sbrowserID, "rect", the rect of group "Browser"
end resizeStack

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: External Video Link - Landscape Rotation

Post by FireWorx » Tue Oct 18, 2011 10:12 pm

Actualy on closer examination the script I posted shows the browser rotated perfectly on the orientation change but breaks the connected link displayed in the browser. I haven't had much time to figure out why.
Dave

Post Reply