- From: Xidorn Quan <notifications@github.com>
- Date: Sat, 01 Aug 2020 22:04:08 -0700
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fullscreen/issues/179/667628115@github.com>
> The first obstacle was that `playerElementInIframe.requestFullscreen()` can't be called cross-site via postMessage from the website that embeds the player because it requires a short running task from a user gesture. postMessage took too long I guess. I believe it's simply because user gesture is not tracked through `postMessage` at all, and thus a handler of `message` event is not considered initiated from a user gesture even if the corresponding message was posted by one. The same was an issue for many other cases including resolving `Promise`, `setTimeout`, etc. I'm not sure whether it's possible to allow that, and what other restrictions we would need to avoid abusing it. > The question/concern that I had is why is there no `fullscreenchange` event fired on the iframe's document? The website (parent) does receive this event but I imagined the iframe would also get some information as it's made fullscreen. The event is dispatched for the document which is entering the fullscreen state, which means not only resizing it to take the size of the whole screen, but also making requesting elements match `:fullscreen` pseudo-class and have `document.fullscreenElement` return fullscreen element, etc. I don't think we would ever want to dispatch `fullscreenchange` to inner document when the fullscreen is requested by its parent. But this seems to be a reasonable request, and probably being able to recognize user gesture / user activation across `<iframe>` boundary would be the right direction moving forward. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fullscreen/issues/179#issuecomment-667628115
Received on Sunday, 2 August 2020 05:04:20 UTC