7

I'm currently developing an iOS app that displays my YouTube videos, I am a YouTube partner and video ads show up when I play my videos inside my browser. However while using the official iOS YouTube Player it doesn't show any kind of video ads whatsoever, does anyone know how to display video ads or get this fixed?

The YouTube Player Library I'm using https://github.com/youtube/youtube-ios-player-helper

Here are the parameters I'm using

  NSDictionary *playerVars = @{
                             @"controls" : @1,
                             @"playsinline" : @1,
                             @"autohide" : @0,
                             @"showinfo" : @0,
                             @"autoplay" : @1,
                             @"fs" : @0,
                             @"rel" : @0,
                             @"loop" : @1,
                             @"enablejsapi" : @1,
                             @"modestbranding" : @1
                             };

As you can see in this image it just starts playing the video and doesn't play any video ad before the video starts

enter image description here

JAL
  • 41,701
  • 23
  • 172
  • 300
Jessica
  • 2,367
  • 2
  • 13
  • 14

1 Answers1

4

When the YTPlayerView iFrame loaded an ad, it used to force the user right out of their app and into Safari. I had opened an issue on the library's GitHub project page back in January and there was a discussion about it on StackOverflow here: Bug in 'YouTube iOS Player Helper' library.

Ultimately, iFrame ads were disabled in PR #58. This was sanctioned by Ibrahim Ulukaya, a member of YouTube's developer relations team.

With iFrame API subject to deprecation at any time, I wouldn't be surprised of YouTube was working on a better library for iOS, similar to the one they have for Android. But for now, ads will not show up in the YTPlayerView.

Community
  • 1
  • 1
JAL
  • 41,701
  • 23
  • 172
  • 300
  • For a long long time, this bug seems still be there. I can not see any ads. – Ricky May 16 '16 at 04:07
  • Same here, ads still won't show up. We asked youtube about this and they white listed our domain and they provided a step for enabling ads. Unfortunately only android was showing the ads not the iOS. Youtube hasn't replied after this. – Jongers Feb 20 '20 at 07:59
  • 1
    Hi @Jongers, may I ask how to connect with YouTube so they can white list your domain for enabling ads? Thanks – Carlos Chen Jun 07 '21 at 15:32
  • 1
    Hello @CarlosChen my project manager personally emailed youtube and we provided our app bundle – Jongers Jun 14 '21 at 02:13