apps crashes after playing a video

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
prexsoccer
Posts: 29
Joined: Fri Jun 08, 2012 9:54 am

apps crashes after playing a video

Post by prexsoccer » Wed Nov 07, 2012 4:44 am

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.

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

Re: apps crashes after playing a video

Post by Klaus » Wed Nov 07, 2012 11:00 am

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

prexsoccer
Posts: 29
Joined: Fri Jun 08, 2012 9:54 am

Re: apps crashes after playing a video

Post by prexsoccer » Thu Nov 08, 2012 1:48 am

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

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

Re: apps crashes after playing a video

Post by Klaus » Thu Nov 08, 2012 10:51 am

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

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

Re: apps crashes after playing a video

Post by Dixie » Thu Nov 08, 2012 12:43 pm

For iOS read the iOS.pdf.. you can use the playerstopped message of the MPmoviePlayer.. page 69

be well

Dixie

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

Re: apps crashes after playing a video

Post by Klaus » Thu Nov 08, 2012 12:54 pm

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

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

Re: apps crashes after playing a video

Post by Dixie » Thu Nov 08, 2012 1:04 pm

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

Post Reply