Video Playback

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Casey Morgan
Posts: 9
Joined: Sat Jan 24, 2015 5:30 pm

Video Playback

Post by Casey Morgan » Wed Aug 19, 2015 2:12 am

I am trying to set up a movie file to play in iOS. It's pretty straightforward, except with resolution independence. This is the openStack handler:

set the fullScreenMode of this stack to "showAll"
set the acceleratedRendering of this stack to true

I set the movie to play in a rect, which works fine as long as the device is set to iPad. If I try to play it using the iPhone simulator, the screen is clipped.

Are movies scalable using fullscreenmode in iOS?

Thanks in advance for your help.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Video Playback

Post by Klaus » Wed Aug 19, 2015 4:51 pm

Hi Casey,

could you please post the script you use for playing the video?
And please note your LC version, too!


Best

Klaus

Casey Morgan
Posts: 9
Joined: Sat Jan 24, 2015 5:30 pm

Re: Video Playback

Post by Casey Morgan » Thu Aug 20, 2015 12:57 am

HI. I am using LiveCode 6.7.6. This is the card script, it is from the example MobileVideoLesson at LiveCode Lessons.

on openCard
// Check the control doesn't already exist. If so delete and recreate it
if "mobilecontrol" is among the lines of mobileControls() then
controlDelete
end if
mobileControlCreate "player", "videoControl"

// Set the basic properties including visibility, rectangle and video file path
mobileControlSet "videoControl", "filename", specialFolderPath("engine") & "/video.mp4"
mobileControlSet "videoControl", "preserveAspect", true
mobileControlSet "videoControl", "showController", true
mobileControlSet "videoControl", "visible", true
mobileControlSet "videoControl", "rect", "250,200,783,500"

// Start playing the video
mobileControlDo "videoControl", "play"
end openCard

on closeCard
// Delete the control when we leave the card
controlDelete
end closeCard

on controlDelete
// Delete the control
mobileControlDelete "videoControl"
end controlDelete

Thanks-

Post Reply