hpique
hpique

Reputation: 120324

Play movie from NSFileWrapper in iOS

How do you play a movie given a NSFileWrapper?

I expected to find a initWithData: constructor in MPMoviePlayerController (as in AVAudioPlayer), but only initWithContentURL: is provided.

Upvotes: 0

Views: 195

Answers (1)

dandan78
dandan78

Reputation: 13854

You can get the filename for an NSFileWrapper node by sending it the - filename messsage. From there, you can turn that into an NSURL using – initFileURLWithPath:, which should do the trick because you can then call initWithContentURL:.

Upvotes: 1

Related Questions