Import
Usage
You can use it to pause a stream when the document is hidden and to resume the stream when the document is visible.
It uses the same options as the injectDocumentVisiblity
function.
A good use case is to pause an API polling when the user switches to another tab or another application.