Question

I have an application that reads audio from internet using QTkit, the problem is, that i need get the state of the playback from the QTMovie object (e.g.: Buffering, Playing, Paused, etc.) but can't find any method or property to do that

Anyone knows how can i get the playback state?

Was it helpful?

Solution

The rate method indicates if the movie is being played back or not.

float rate = [movie rate];

Rate = 1.0 means normal playback, rate = 0 means the movie is stopped or paused, rate = 0.5 means slow payback, negative values mean rewind, etc. There is no method for buffering. However, there are many useful attributes, in particular the one that indicates load state.

NSInteger loadState = [[movie attributeForKey:QTMovieLoadStateAttribute] longValue];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top