views:

86

answers:

2

The MPMediaPlayback protocol seems to not define any helpful method for this, and I couldn't find one in the MPMoviePlayerController. But I guess there IS a way to do it, because users must be able to drag the slider to some point in time when playing a movie.

Yesterday I was reading a blog post that claimed the MPMovieController could do exactly that. Unfortunately I didn't bookmark it...

For example, I would want to start the movie programmatically at 20 seconds.

Does anyone know how to do it?

BTW, it's non-streaming content!

+1  A: 

There's a currentPlaybackTime property accessible in the MPMediaPlayback protocol, simply set it with the chosen position in the movie (e.g. 20.0 for 20 seconds into the movie)

Guy
A: 

If you want to restrict the playback range, set initialPlaybackTime and endPlaybackTime. Playback will automatically start at the "initial" time.

IIRC the scrubber control is slightly broken on 3.1.

tc.