Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MWPW-161562] Auto pause videos #3648

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

overmyheadandbody
Copy link
Contributor

@overmyheadandbody overmyheadandbody commented Feb 7, 2025

This ensures that Sharepoint and MPC videos that aren't authored to be played automatically are paused when they are no longer in the viewport.

A few dev notes:

  • although we already have a method to define intersection observers, it is currently set up to execute a callback only on intersection. For this requirement we need the exact opposite. I've fiddled around to augment the method from utils.js, but ultimately decided against it, since it created impractical overhead. We'd also have to call it twice under certain circumstances, since the rootMargin value is different;
  • I've noticed that the figure block uses node cloning to decorate the content, I've created https://jira.corp.adobe.com/browse/MWPW-167455 to update this behavior

Resolves: MWPW-161562

Test URLs:

Copy link
Contributor

aem-code-sync bot commented Feb 7, 2025

Copy link

@SilviuLCF SilviuLCF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milo-pr-merge milo-pr-merge bot merged commit f17c4df into adobecom:stage Feb 11, 2025
16 checks passed
@milo-pr-merge milo-pr-merge bot mentioned this pull request Feb 11, 2025
@overmyheadandbody overmyheadandbody deleted the auto-pause-videos branch February 17, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants