Page 1 of 1

apps crashes after playing a video

Posted: Wed Nov 07, 2012 4:44 am
by prexsoccer
hi good day,

I have problem on my app when playing a movie.
i have a trailer on my app. before it works fine when testing it simulator 5.1 but after I update to 6, the app will crash after playing the video.

here is the code i use:

on openCard
put specialFolderPath ("engine") & "/trailertest.mp4" into filetoplay
play video filetoplay
wait until the movie is done
go to card 26
end openCard


thank you for your help.

Re: apps crashes after playing a video

Posted: Wed Nov 07, 2012 11:00 am
by Klaus
Hi prexsoccer,

you can only:
...
wait until the sound is "done"
...
Trying this with "movie" obviously causes heavy inconvenience, although Livecode should not crash in any case!
Write to: bugs@runrev.com


Best

Klaus

Re: apps crashes after playing a video

Posted: Thu Nov 08, 2012 1:48 am
by prexsoccer
hi klaus,

I tried in the previous version and it work fine with that statement.
in this case, can you give me a sample script or code that will do the same thing?

thank you klaus.

best regards,
mike

Re: apps crashes after playing a video

Posted: Thu Nov 08, 2012 10:51 am
by Klaus
Hi Mike,
prexsoccer wrote:hi klaus,

I tried in the previous version and it work fine with that statement.
Hmm, then
a. RunRev forgot to put this into the docs or
b. you are just a very lucky guy :D

I do not develop for mobile, so I do not know what commands/functions/messages
are available for playing video here, sorry.

On the desktop I would script the "playstopped" message for a player object,
but don't know if something like this is possible on iOS.


Best

Klaus

Re: apps crashes after playing a video

Posted: Thu Nov 08, 2012 12:43 pm
by Dixie
For iOS read the iOS.pdf.. you can use the playerstopped message of the MPmoviePlayer.. page 69

be well

Dixie

Re: apps crashes after playing a video

Posted: Thu Nov 08, 2012 12:54 pm
by Klaus
Hi Dixie,

ah, cool, thanks!
But this does not work with the simple "play video XYZ" command, you need to create (and manage) a native "player" control, right?


Best

Klaus

Re: apps crashes after playing a video

Posted: Thu Nov 08, 2012 1:04 pm
by Dixie
Klaus..

Yes, you would need to use an MPMoviePlayer control... but using this control is the only way to achieve what the poster requires... and it sure beats 'wait until the movie is done'...:-)

be well

Dixie