! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Automatically enable presentation mode when watching videos on YouTube?
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Or Schiro 2018-09-26 01:31:15 CEST
Dear all, 

From an end user perspective, it would be very convenient if presentation mode could automatically be enabled temporarily as long as the user is watching a video on YouTube (or any website?) inside his browser (Chrome, Firefox?). 

After watching a video, automatically disable presentation mode again. 

This would have the advantage that the display won't be dimmed after X seconds while watching the video, without the user having to take care of it. 

Looking forward to your thoughts and feedback. 

Yours
Comment 1 Andre Miranda editbugs 2018-09-26 01:55:42 CEST
I think video players (and perhaps browsers) only inhibit the screensaver, e.g. https://git.xfce.org/apps/parole/tree/src/common/parole-screensaver.c

I don't know any protocol for that via dbus, dpms or something else.
Comment 2 Theo Linkspfeifer editbugs 2018-09-26 12:57:00 CEST
Mozilla bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1398539
Comment 3 Or Schiro 2018-09-26 14:11:37 CEST
Dear Theo, 

Thanks for the bug report link. It seems to have been fixed in Firefox. Does this mean that presentation mode is automatically triggered if one watches videos in Firefox 58 and above?

Yours
Comment 4 Andre Miranda editbugs 2018-09-27 04:25:36 CEST
Apparently not, running xdg-screensaver status while playing youtube videos on Firefox 62 (and Chromium 69) yields "enabled".

Looking at the commit[1] from that bug report and its file[2], one can see that:
a) it tries to call a dbus interface called org.freedesktop.ScreenSaver
b) if that fails, it falls back to Gnome's session manager dbus methods. xfce4-session-manager could implement a similar interface, but I don't think it's worth, a freedesktop standard would be preferable.
c) finally if that also fails, XScreenSaver approach is attempted, loading libXss.so.1 and calling XScreenSaverSuspend.

In a quick glance of gnome-session, it appears to only be a storing and serving the inhibit state, something else like a power-manager or screensaver should probably query  it.

1 - https://hg.mozilla.org/integration/autoland/rev/baff3e812914
2 - https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/WakeLockListener.cpp
Comment 5 Git Bot editbugs 2020-05-27 01:43:26 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/42.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14721

Reported by:
Or Schiro
Reported on: 2018-09-26
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
5 users

Version

Attachments

Additional information