Video not playing
Video not playing
- Subject: Video not playing
- From: Jonathan Hull <email@hidden>
- Date: Sun, 24 May 2015 22:08:37 -0700
Hello Cocoa Devs,
I am a bit stumped by this, but hopefully it is an easy answer to someone who has worked with videos more.
The effect I am trying to achieve is having an image of a video showing among other elements, and when the user taps the video it zooms to fullscreen and plays.
Here is my attempt:
let player = MPMoviePlayerController(contentURL: videoURL)
player.prepareToPlay()
player.view.frame = frame //This is defined above as the stillFrame’s frame
self.view.addSubview(player.view)
player.setFullscreen(true, animated: true)
player.play()
This does the zoom, but the video just shows “Loading…” indefinitely. I know that the video url is correct and that the video can play because this code works (it just doesn’t do the zoom):
let player = MPMoviePlayerViewController(contentURL: videoURL)
player.moviePlayer.prepareToPlay()
player.moviePlayer.play()
self.presentMoviePlayerViewControllerAnimated(player)
Any idea what is going on here? Am I missing something simple in the first example?
Thanks,
Jon
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden