WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
234976
webkitRequestFullscreen fulfils but will not go into fullscreen with click handler that creates MediaStream and plays video
https://bugs.webkit.org/show_bug.cgi?id=234976
Summary
webkitRequestFullscreen fulfils but will not go into fullscreen with click ha...
Will Morgan
Reported
2022-01-07 11:57:56 PST
Created
attachment 448616
[details]
fs.html testbed When I click a button that creates a MediaStream with getUserMedia, then plays a video that satisfies the autoplay criteria, then performs webkitRequestFullscreen (WRFS), the WRFS call return but no fullscreen resize event happens. For compatibility with other browsers, especially with regard to anti-abuse and user activation, the advice is to first getUserMedia, then play a video, then finally requestFullscreen. This is because requestFullscreen clears user activation flags, which means that you can't getUserMedia afterwards. This is the approach suggested here:
https://github.com/whatwg/fullscreen/issues/152#issuecomment-494840412
My expected behaviour here would be for webkitRequestFullscreen to actually go into fullscreen, or at the very minimum if the WebKit team disagree with the WHATWG user activation approach, it should at least throw with a NotAllowedError. This has downstream implications - sindresorhus's screenfull library returns a promise that never fulfils because WRFS doesn't throw and no change events happen. This effectively deadlocks any application that relies on entering fullscreen unless an arbitrary timeout is used. I'm discussing the same issue with the team at Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=957558
Attachments
fs.html testbed
(2.29 KB, text/plain)
2022-01-07 11:57 PST
,
Will Morgan
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Mark B
Comment 1
2022-01-10 00:24:17 PST
Is this issue common to macOS and iOS? And is it new in Safari 15? Are all minor versions affected? We would also appreciate feedback on whether the current behaviour is intended, and if so some guidance around avoiding the described deadlock. If not, is a fix already in the pipeline?
Radar WebKit Bug Importer
Comment 2
2022-01-10 09:48:31 PST
<
rdar://problem/87346180
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug