Niazipan
Niazipan

Reputation: 1037

Chrome Extension - Turn background page on / off programatically

Is it possible to turn a Chrome Extension background page off and on programatically rather than disable it through the Extensions page in Chrome?

I have a Chrome Extension that uses a background page to access a user's webcam (getUserMedia) - however nothing can turn off the webcam once started. Is there a way to disable the background page or pause it, then restart it later programatically? Or once you had turned it off would it then be disabled and unable to receive the call to turn back on?

Any help appreciated. Feel like I'm banging my head against a brick wall with this one.

Upvotes: 0

Views: 904

Answers (1)

David P.
David P.

Reputation: 370

The event page is loaded when it is "needed", and unloaded when it goes idle again.

maybe take a look into Event Pages https://developer.chrome.com/extensions/event_pages.

Upvotes: 2

Related Questions