vs adblock

Issue Saavn tries to show ads at various events, most of which are during song switches and before the song and a lot other events. But the issue happens when they can’t show an ad at any event.

So logic for displaying ads is very simple:

  • try displaying an ad
  • if not shown, retry

Issue Image

Recreate the issue > Install AdBlock plugin > Open > Play any playlist and wait > See the counter on the AdBlock go biking!

Solution Try implementing a single counter condition that when you are unable to display an ad for more than ‘n’ time, it will try to show ad later, maybe after one song finishes.

Like this:

Like Loading…

Originally published at on December 26, 2014.