* Set autoplay video configuration according to specification:
- Do not autoplay video initially
- If the video is visible on the viewport (with a threshold of 80% of the video is visible), autoplay video, and everytime it autoplays, set the video starting point to 0
- If the video is not visible on the viewport (with a threshold of 80% of the video is not visible), pause the video
- If user screen stops at video that's currently in autoplay, the autoplay will stop after it endedand replay every 15 seconds.
- For user with reduced motion preference, show video controls.
* Add a comment explaining error in firefox if user is pressing the seek bar relatively fast.
It seems to be a bug specific to firefox.
* Reduce the threshold to 70% of the visible video on the screen.
0.7 value will make the video autoplays instantly for the `new-design-registration` variant since the video on that variant will not be shown fully on the screen at initial homepage load (in desktop screen).
* Set attribute without empty string, fix video that lacked data attribute
* Remove duplicated autoplay video setup on homepage
* Remove autoplay pause/reset on scroll away, don't play if not visible
Refactors the autoplay-video code and removes the pause/reset on scroll
away while also keeping track of the video elements visibility so that
the video doesn't immediately start playing after 15s if not visible.
We also prevent trying to call .play() before the video is in a
"canplay" state. If the video is not ready, then add an event listener
for the "canplay" event and only play() once this is fired. We only do
this once to avoid adding duplicate listeners.
We also check that the video is not playing before calling play(),
because it could still be in playback if we scroll out of view and then
back into view.
* Refactor autoplay-video to match style of similar JS enhancement implementations
* Move autoplay-video from shared/utils to features/
---------
Co-authored-by: Thomas Mees <thomas.mees@overleaf.com>
Co-authored-by: Thomas <thomas-@users.noreply.github.com>
GitOrigin-RevId: 13011af04baaeba4b8053478a09e3e4d7c960d5c
[web] Attach aborted captcha event handler to body instead of '.content' to fix register flow on homepage website-redesign
GitOrigin-RevId: f3e5b67476fb2584b7b6eec26114f2cc6e00bfdb
* wait doc:saved before compiling
* Refactor DocumentCompiler class to handle pending operations before compilation
* add timeout for pending op
* Increase PENDING_OP_MAX_WAIT to 10000 milliseconds
* check if currentDoc exists
* check doc id on doc:saved
* Fix conditional statement
* Refactor to add and remove event listeners for doc:saved event
* check if getPendingOp exists
* typeof getPendingOp
* forgot to push updates
* add flush-changes event
* use promise for handling pending operations
* Remove console.logs
* add isAwaitingBufferedOps
* Revert "add isAwaitingBufferedOps"
This reverts commit 56b0bbc13caf6375d1cf50e8f65f599e7263c404.
* move _awaitBufferedOps in try block
* dont check for matching doc id
* add a todo comment
GitOrigin-RevId: 9225e7d1a7a69385dc1a26bf7663f89f59db6a8a
* [visual] Skip moving cursor inside argument if there is no decoration
* Refactor skipAtomicRanges function
* rangeSet outside the loop, continue rather than return
* use rangeSet.between
* prettier
GitOrigin-RevId: 85ef817e09ea7eb854cec43cb7866f61b4bfbc21