views:

126

answers:

1

Hi everyone !

I need to use a property defined in MPMoviePlayerController called currentTime (in iOS 3). It seems to be a private property but not in iOS 4, which is now called currentPlaybackTime.

I want my app to be launched starting iOS 3.0. So I wrote this :

@implementation MPMoviePlayerController(extended)

-(double)time {

     if ([self respondsToSelector:@selector(currentPlaybackTime)]){

          return [self currentPlaybackTime];

     }

     return [self currentTime];

}

@end

So I can use this function in each OS to get movie current time. I just would like to know if it is allowed and if my application would be rejected... If it is, how can I get this property ? Is there another way to play a video and get its current time without using MPMoviePlayerController ?

Thanks

A: 

respondsToSelector is run time checking if there it gives if not if wont gives so no need to bother carry on....

jeeva
Mhh, yeah, I will try and post my app to Apple when it will be okay. I will see if it is really accepted. But if not, do you know if it is another way to play a progressive downloaded audio or video and get it's current time easily ?
sui
You can go for AVPlayer (AVFoundation but its available above IOS4).
jeeva
Yes, I saw it but I want to have this property before iOS 4 :(
sui