Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to control play section of MPMoviePlayerController

I'm making app using MPMoviePlayerController.

I want to make special function.

What I want to function is like this.

If I play movie, player will stop after few second (ex: 30sec).

If I click play button, player has to play from 30sec to next stop point.

For me to realize this function, I've used initialPlaybackTime and endPlaybackTime option of MPMoviePlayerContrller.

But, this function didn't work like my thought.

mplayer.initialPlaybackTime = 0;
mplayer.endPlaybackTime = 10;

[mplayer play];

....
[mplayer pause];

,,,

mplayer.initialPlaybackTime = 10;
mplayer.endPlaybackTime =30;
[mplayer play];

And, mplayer is played again from 0 to 10, not from 10 to 30.

like image 921
hyekyung Avatar asked Dec 27 '22 02:12

hyekyung


1 Answers

This is a little late, but for anyone who comes upon this question, it appears that endplaybacktime and initialplayback time can only be set once for an initialized mpmovieplayercontroller. If you want to reset the values you'll have to destroy your mpmovieplayercontroller instance and create a new one.

This is very disappointing, could I be wrong? I would love it if I were.

like image 154
Patrick Avatar answered Jan 15 '23 19:01

Patrick