You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Cameron, just wanted to say that you've done a really nice job on this project! However, I'm having trouble with some Swift code. Whenever I call the MPMovieController, a black screen shows. Here is some code:
func makeMovie(){
let settings:NSDictionary = CEMovieMaker.videoSettingsWithCodec(AVVideoCodecH264, withWidth: images![0].size.width, andHeight: images![0].size.height)
let movieMaker = CEMovieMaker(settings: settings as [NSObject : AnyObject])
movieMaker.createMovieFromImages(self.images) { (fileURL:NSURL!) -> Void in
self.viewMovieAtURL(fileURL)
}
}
func viewMovieAtURL(fileURL:NSURL){
var moviePlayer : MPMoviePlayerController?
moviePlayer = MPMoviePlayerController(contentURL: fileURL)
if let player = moviePlayer {
player.view.frame = self.view.bounds
player.prepareToPlay()
player.scalingMode = .AspectFill
self.view.addSubview(player.view)
}
}
I think it may be a problem with the fileURL, though no errors are being thrown. The MPMoviePlayer just shows a black screen. Thoughts?
The text was updated successfully, but these errors were encountered:
Hi Cameron, just wanted to say that you've done a really nice job on this project! However, I'm having trouble with some Swift code. Whenever I call the MPMovieController, a black screen shows. Here is some code:
I think it may be a problem with the fileURL, though no errors are being thrown. The MPMoviePlayer just shows a black screen. Thoughts?
The text was updated successfully, but these errors were encountered: