Automattic / Automattic/jetpack
Enhancement: Support for fullscreen click event from outside video player
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
VideoPress
### What
Remove the Iframe API fullscreen requirement to click on frame first
### How
Couple use cases include player being used in popups and auto playing on open (click button trigger), or background videos having a custom button to open them full screen.
This works fine with a few other player APIs so I don't believe its a limitation of the browser but rather the Iframe API requiring a click within the frame/player before working.
In my experience, the browser already handles blocking fullscreen without user interaction, can't see the need for a library to do it also. Similar to how it won't auto play unless you mute the player first.
Our use case integrated within a plugin is to support multiple players, as such have built JS interfaces for each to unify the API on our end.
To be clear our code "just works" if we click inside frame, close popup and reopen. Its only this initial interaction requirement which poses a problem.
Contributor guide
Research direction
Start by locating the VideoPress iframe API handling for fullscreen and reproduce the initial external-click case described in the issue, including popup, autoplay-on-open, and background-video controls. Done means an external user gesture can open the player fullscreen without first clicking inside the frame, while browser fullscreen restrictions still apply.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100