| Summary: | Plasma-browser-integration should set CanSetFullscreen/FullScreen mpris2 property for videos | ||
|---|---|---|---|
| Product: | [Plasma] plasma-browser-integration | Reporter: | Federico <nierro92> |
| Component: | general | Assignee: | Kai Uwe Broulik <kde> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nate |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/plasma-browser-integration/23d978c0ee173795d1d27609901bda82cd891875 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Federico
2019-05-29 10:24:13 UTC
I toyed around with it, however, most websites do something special when fullscreening the video. If I just blatantly call requestFullScreen() on the HTML5 video element on e.g. YouTube it horribly breaks, which is why I never bothered implementing this. I think this surely is a stupid idea, so forgive me if it actually is...but what about just pressing fullscreen button from code when FullScreen=true is requested? This way it would be indistinguishable from a normal user "go-fullscreen" operation. It's surely not a stupid request :) What I can probably at least do is reflect the full screen state in the FullScreen property, setting full screen is an entirely different story.
I cannot really know what the fullscreen button is. Try for yourself on youtube, run the following in the developer console Ctrl+Shift+I:
document.querySelector("video").requestFullscreen()
I just tried with vimeo which works fine. So maybe we can do this after all and just have to live with the fact that sometimes it doesn't work as expected. Setting this as confirmed.
> I cannot really know what the fullscreen button is. I imagined that could cause some troubles. > I just tried with vimeo which works fine. So maybe we can do this after all and just have to live with the fact that sometimes it doesn't work as expected. Setting this as confirmed. This is great, thanks! Git commit 23d978c0ee173795d1d27609901bda82cd891875 by Kai Uwe Broulik. Committed on 17/06/2019 at 13:08. Pushed by broulik into branch 'master'. Allow setting fullscreen via MPRIS This implements CanSetFullscreen to return true when it's a video and lets the Fullscreen property reflect and change the fullscreen state of the player. Differential Revision: https://phabricator.kde.org/D21554 M +2 -5 dbus/org.mpris.MediaPlayer2.xml M +21 -1 extension/content-script.js M +7 -1 extension/extension.js M +35 -0 host/mprisplugin.cpp M +11 -0 host/mprisplugin.h https://commits.kde.org/plasma-browser-integration/23d978c0ee173795d1d27609901bda82cd891875 |