Audio playing but not video

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bruceBUSXpd
Posts: 6
Joined: Tue Jan 08, 2013 12:36 am

Audio playing but not video

Post by bruceBUSXpd » Sun Feb 03, 2013 8:01 pm

Hey Guys,

In my second card of my stack I have an image which when clicked should play video. In the simulator when the image is clicked only the audio plays not the video as well. Check out my code below....

Cheers,

Code: Select all

on MouseUp
// When user clicks on image it disappears
set the visible of image "new-video-splash-images.png" to false
   // Check the control doesn't already exist. If so delete and recreate it
if "ioscontrol" is among the lines of iphoneControls() then
controlDelete
end if 
iphoneControlCreate "player", "ioscontrol"

// Set the basic properties including visibility, rectangle and video file path
iphoneControlSet "ioscontrol", "filename", specialFolderPath("engine") & "/video/teil1-5.mov"
iphoneControlSet "ioscontrol", "preserveAspect", true
iphoneControlSet "ioscontrol", "showController", true
iphoneControlSet "ioscontrol", "visible", true

// Start playing the video
iphoneControlDo "ioscontrol", "play"

   
end MouseUp


endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Audio playing but not video

Post by endernafi » Sun Feb 03, 2013 9:44 pm

Hi Bruce,

You haven't set the rect of the control.
That may be the problem.

Hope it helps...

Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

bruceBUSXpd
Posts: 6
Joined: Tue Jan 08, 2013 12:36 am

Re: Audio playing but not video

Post by bruceBUSXpd » Wed Feb 06, 2013 9:28 pm

Thanks Ender,

The rect control was all that I needed.

Cheers,

Post Reply