Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ads Opening in Safari Without User Interaction? #54

Closed
JALsnipe opened this issue Jan 7, 2015 · 6 comments
Closed

Ads Opening in Safari Without User Interaction? #54

JALsnipe opened this issue Jan 7, 2015 · 6 comments

Comments

@JALsnipe
Copy link
Contributor

JALsnipe commented Jan 7, 2015

I've found when playing back some YouTube videos using this library, before the video even starts, Safari will open to a blank ad page. I've been able to reproduce this with this video: https://www.youtube.com/watch?v=ydv6j9CrPGo

Has anyone else experience this? Is there a better way to handle ad interruptions besides forcing the user out of the app and into Safari?

@dictav
Copy link
Contributor

dictav commented Jan 8, 2015

+1

I fixed this problem in this way: dictav@f10de44

@JALsnipe
Copy link
Contributor Author

JALsnipe commented Jan 8, 2015

Nice this is great, thanks! Wouldn't this violate YouTube's Terms of Service though?

@JALsnipe
Copy link
Contributor Author

@iulukaya What is the YouTube-sanctioned way to handle ads redirecting the user out of your app?

@khaledrepos
Copy link

I fixed it by 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.

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

@JALsnipe
Copy link
Contributor Author

Looks like @dictav's way of handling this has been sanctioned by @iulukaya and has been merged into the master branch.

#58

Closing this issue.

@stanislaw
Copy link

Could you please also update podspec so new version would have this change onboard? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants