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

video playback IOS

Post by Es124 » Fri Nov 04, 2011 7:13 pm

IOS release notes for Video playback support :
Basic support for playing videos has been added using a variant of the play command. A video file can be played by using:
play ( video-file | video-url )

I don't know what to do, HELP,
I want to start the movie trough an image button.

i did try : on mouseup
play " abc.mov " ,

also i did load them in the standalone app. as non-stack files and refer to them :
on mouseup
play "/Volumes/LaCie/Digital Publishing/...../1_1.mov"

greetings,
Enno

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: video playback IOS

Post by bn » Fri Nov 04, 2011 7:36 pm

Es124,

you have to provide a file path for the video file.

For example, you added the video file to you project in the standalone builder -> Copy Files.
This file will be in specialFolderPath ("engine")

have a look at this thread:
http://forums.runrev.com/phpBB2/viewtop ... lit=+video

important: once you have your path right (and iOS is case-sensitive) you can issue a play video command.

Look over at the other thread. I is all explained there.

Once you got this working you would want to look at MPMoviePlayerController in the iOS release notes.

Kind regards

Bernd

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

Re: video playback IOS

Post by Es124 » Fri Nov 04, 2011 9:22 pm

Hi,

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

Also is it normal that it takes so long to load a new card ( around 10 s. ) app is only 55 mb.
Attachments
Schermafbeelding 2011-11-04 om 21.18.14.jpg

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: video playback IOS

Post by bn » Sat Nov 05, 2011 10:46 pm

Hi,

if you add a file the path you see in the standalone application settings is not the path that will be in the "engine" folder. It is more like

play video (specialFolderPath ("engine") & "Cover with CIOR.mov")

you could test if the path is right by:

Code: Select all

if there is a file (specialFolderPath ("engine") & "Cover with CIOR.mov") then 
put "found the file" into field "myField"
else
put "did not find the file" into field "myField"
end if
obviously you would have to make a temporary field "myField" to see the result.

Kind regards

Bernd

Post Reply