Comment 82 for bug 434476

Revision history for this message
In , Kchen-d (kchen-d) wrote :

(In reply to Chris Pearce (:cpearce) from comment #22)
> mounir no longer works for us, so may not be checking bugmail.
>
> kanru: you wrote the WakeLock, can you answer my question to mounir in
> comment 21 please?
>
> I'm trying to figure out if there's any reason why we can use "screen" wake
> lock listeners on desktop to disable the screen saver while video is
> playing. We're currently doing this in B2G, so I don't see why we shouldn't
> for Linux (and other desktop platforms) too.
>
> Justin Lebar previously said we needed a "trusted" wake lock to be
> implemented, but I don't understand why that should be necessary now, since
> mozPower is only accessible to content in privileged apps.

It's not about mozPower but navigator.requestWakeLock. Currently any web page could request a wake lock and keep screensaver from appearing. Note I'm going to land a patch for bug 963366 that hide wake locks from the web so using it in gecko is safe but this might change in the future.