Skip to main content
Inspiring
August 16, 2010
Question

Youtube AS3 API block ads help

  • August 16, 2010
  • 1 reply
  • 2187 views

Hi all,

I sucesfully load youtube videos to my flash by following this steps: http://code.google.com/apis/youtube/flash_api_reference.html

Now I want to be able to block the ads, a friend said he did it by adding this code ?rel=0&showinfo=0 at the end of the video url in HTML but I am not sure how to do it for the AS3 code

Any help will be much appreciated

Cheers

rS

This topic has been closed for replies.

1 reply

Inspiring
August 16, 2010

Try to append it to video url:

http://www.youtube.com/v/VIDEO_ID?rel=0&showinfo=0

nardoveAuthor
Inspiring
August 16, 2010

Hi Andrew,

I did by calling player.loadVideoByUrl("http://www.youtube.com/v/<MY_VID_ID>?rel=0&showinfo=0", 0); but no luck

Check out my output console:

player ready

player state: -1

player state: -1

video quality: small

player state: 3

GET AD BREAKS : BaseAdbreakDefiner

loading: [AdSlot: break.start=0 id=0 loader=[object AfvAdLoader]]

player state: 1

At some point is calling the ads, any ideas?
Cheers
rS

Inspiring
August 16, 2010

Frankly, it would be quite stupid of youtube to allow ad skipping in the videos that are meant to show commercials. Its a money thing. So, I guess, even if there was a hack - it would be closed by youtube. Unless, of course, there is a legit way which I cannot find.