re : video playback IOS

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
Es124
Posts: 26
Joined: Sat Apr 30, 2011 3:48 pm

re : video playback IOS

Post by Es124 » Sat Nov 05, 2011 10:04 am

Hi,

1. i know that i do something wrong, but i don't know what ?

on mouseup
play video specialFolderPath ("engine") & "/Volumes/LaCie/Digital Publishing/The castle explorer/Chateau_Amboise_Royal_Folio kopie/OverlayResources/Cover/Cover with CIOR.mov"
end mouseup

on movieTouched
play stop
end movieTouched

2. Also is it normal that it takes so long to load a new card ( around 10 s. ) app is only 55 mb. testing on an iPad 1

Attachments

Schermafbeelding 2011-11-04 om 21.18.14.jpg

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: re : video playback IOS

Post by Dixie » Sat Nov 05, 2011 11:04 am

Hi...

Here is a script that will play a 'movie' on your ipad when a card opens... It seems that you are a little more than confused about the names of commands in liveCode.... Also have a look at page 47 of the iOS release notes about using the MPPlayerControl in iOS

Code: Select all

local theMovie

on openCard
   if the environment is "mobile" then
      if "theMovie" is among the lines of iphoneControls() then controlDelete
      
      iphoneControlCreate "player", "theMovie"
      iphoneControlSet "theMovie", "filename", specialFolderPath("engine") & "/swings.mp4"
      iphoneControlSet "theMovie", "rect", "192,142,836,642"
      iphoneControlSet "theMovie", "preserveAspect", true
      iphoneControlSet "theMovie", "showController", true
      iphoneControlSet "theMovie", "visible", true
      
      --iphoneControlSet "theMovie", "fullscreen", true
      --iphoneControlDo "theMovie", "play"
   end if
end openCard

on closeCard
   controlDelete
end closeCard

on controlDelete
   iphoneControlDelete "theMovie"
end controlDelete
hope it helps,

Dixie

Es124
Posts: 26
Joined: Sat Apr 30, 2011 3:48 pm

Re: re : video playback IOS

Post by Es124 » Sat Nov 05, 2011 12:10 pm

Hi,

now i'm completely lost .
Do i past :

local theMovie

on openCard
if the environment is "mobile" then
if "theMovie" is among the lines of iphoneControls() then controlDelete

iphoneControlCreate "player", "theMovie"
iphoneControlSet "theMovie", "filename", specialFolderPath("engine") & "/swings.mp4"
iphoneControlSet "theMovie", "rect", "192,142,836,642"
iphoneControlSet "theMovie", "preserveAspect", true
iphoneControlSet "theMovie", "showController", true
iphoneControlSet "theMovie", "visible", true

--iphoneControlSet "theMovie", "fullscreen", true
--iphoneControlDo "theMovie", "play"
end if
end openCard

on closeCard
controlDelete
end closeCard

on controlDelete
iphoneControlDelete "theMovie"
end controlDelete


and only chance "/swings.mp4" with my ".mov" location form the standalone app. ?

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: re : video playback IOS

Post by Dixie » Sat Nov 05, 2011 12:14 pm

Hi...

'swings.mp4' is the file name of a movie to play in the above script... You will have to substitute that name with the filename of your movie that you wish to have play in the MPPlayerControl on your iPad...

Dixie

Es124
Posts: 26
Joined: Sat Apr 30, 2011 3:48 pm

Re: re : video playback IOS

Post by Es124 » Sat Nov 05, 2011 1:00 pm

Hi Dixie

it just give me a black rectangle.
Do i have to chance the .mov file into a m4v file ?



greetings,
Enno
Attachments
Schermafbeelding 2011-11-05 om 12.56.53.jpg

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: re : video playback IOS

Post by Dixie » Sat Nov 05, 2011 1:30 pm

Enno...

Can you mail me the movie you wish to play 'offlist'...
john@ihouse.on-rev.com

be well

Dixie

Es124
Posts: 26
Joined: Sat Apr 30, 2011 3:48 pm

Re: re : video playback IOS

Post by Es124 » Sat Nov 05, 2011 1:51 pm

Hi Dixie,

email send.

Post Reply