Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spoof or disable the Page Visibility API [closed]

The Page Visibility API starts to be commonly used to pause mandatory video advertisements when the tab is not in focus.

This means you need to be watching the ad, if you switch tab or even have another app or menu covering the browser the ad will pause and prevent access to the content.

It is extremely annoying but I couldn't find a way to circumvent this.

Is there any way to disable or spoof the API, so one can do something else while the ad is playing?

like image 940
aberaud Avatar asked Sep 21 '13 02:09

aberaud


People also ask

What is Page Visibility API?

The Page Visibility API defines a means to programmatically determine the visibility state of a top-level browsing context, and to be notified if the visibility state changes. Without knowing the visibility state of a page, web developers have been designing web pages as if they are always visible.

Which event gets fired when the model has been made visible to the user?

The visibilitychange event is fired at the document when the contents of its tab have become visible or have been hidden.


1 Answers

I wrote you an extension that will do just that.

Available here.

I tested it on this page.

Repository here.

Let me know if you have any questions.

like image 121
Wyatt Avatar answered Sep 22 '22 17:09

Wyatt