iFixit/iFixit-iOS — pull request #14 by BaseInfinity (2013-03-14 22:19:38+00:00)
Title: Fix Various Video Bugs

Few things to explain on my changes:

1. We now hide images if on a video step, there's no reason to keep the NoImage
ruler in the background if a video is playing over it. This was also causing
the image to leak out from behind the video.

2. I removed the call to MPMovieController.scalingMode because it was unneeded,
by default it will start off as the aspect ratio we were assigning.

3. Originally we were setting the fullscreen property to be true, but we
weren't using it correctly at all. Which meant we never were going
fullscreen when we wanted to (if a user presses the play button).

4. I added two Notications to keep track of events, so now we correctly go
fullscreen when the user hits the play button. When the user is done viewing
the video, we will exit full screen and take them back to the guide step they
were looking at.

5. Videos on iOS 6.1 were not playing at all in fullscreen, this is due to
undocumented changes where when a video enters fullscreen, the
"viewDidDisappear" method gets called, where we were stopping the video. To
work with all versions of iOS, we now only stop the video if the user is not in
full screen, which still allows us to stop the video when the view truly does
disappear (and not just having the video go into fullscreen when the user is
still technicaly on the view).