8
votes

I have been using the 'YouTube iOS Player Helper' library for playback of our youtube videos in our iOS App (iPhone).

Today I noticed a bug in the same, whenever it tries to load a video with 'In Stream Ads' it pauses the playback of video, closes our app and then opens mobile safari app with the link to "pubads.g.doubleclick.net" page. The page loads with a blank screen.

I repeatedly checked the app, this behaviour is consistent with all YouTube videos with 'In Stream Ads'. Also a video without any ads is working ie playing fine in the app without triggering mobile safari.

Any ideas on when this bug will be resolved?

I'm using iOS 8.1.2 (12B440) on iTouch 5th generation. I also get the same result in iPhone simulator also.

Thanks :)

1

1 Answers

10
votes

A temporary solution (until this problem is fixed) is adding another condition in the method shouldStartLoadWithRequest() that is located in the file YTPlayerView.m. The condition should intercept requests made to pubads.g.doubleclick.net.

The following lines solved the problem for me:

else if ([request.URL.host isEqual: @"pubads.g.doubleclick.net"])
{
         return NO; 
}