googleads/google-media-framework-ios — pull request #47 by hariharsubramanyam (2014-08-05 21:01:45+00:00)
Title: Call content complete when player is killed

I noticed that sometimes ads didn't play. For instance, clicking the "Skippable preroll" video, then switching to another video, and then returning to "Skippable preroll" would not show a preroll at all.

The reason seems to be that the IMA SDK expects us to call contentComplete in the adsLoader. Initially, we were calling this method only if the playback ended. Now, we are calling it whenever the video player is killed when an ad is playing. This way, we can play the video again without worrying that the ad won't be displayed.