Closed Bug 448545 Opened 16 years ago Closed 7 years ago

Pause plugin when system idle

Categories

(Core Graveyard :: Plug-ins, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: dougt, Unassigned)

References

Details

(Keywords: helpwanted)

we should stop plugin from playing when during system idle to save battery life.
How do you know I'm not sitting back and watching a video?
the event that I was thinking about using is system-idle (after the screen goes to sleep and the device is in power-saving mode).
it isn't clear how best to implement power saving mode in fennec.  any help or input appreciated.
Assignee: doug.turner → nobody
Keywords: helpwanted
Ok, seems I know what to do:
In power saving mode (screen off, state idle [controlled by system, osso state]):
1) Stop video playback
2) don't stop audio playback
3) don't stop downloads
4) suspend active javascript (for page content not for fennec downloads ;) )
For N900 we are sending to document "pluginshide" "pluginsshow" event for document window:
https://garage.maemo.org/svn/browser/mozilla/trunk/microb-eal/src/gecko/gmozillacppwrapper.cpp:3084

And here is the patch for Gecko:
https://garage.maemo.org/svn/browser/mozilla/trunk/microb-engine/microb-engine/debian/patches/perf_tweaks/attachment.cgi%3fid=53721.diff

It is listening for those notifications, and sending Fake XEvent to plugins (windowless) with Obscured/Visible flag.

Also in microb this patch sending "visible/invisible" events to flashplugin when plugin element goes out of scroll port rect area
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.