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

AMP Video Players: use IntersectionObserver instead of viewportCallback + scroll detection. #30647

Merged
merged 3 commits into from
Oct 27, 2020

Conversation

samouri
Copy link
Member

@samouri samouri commented Oct 13, 2020

summary
Supersedes #30619. A more aggressive take on the same idea.
Partial for: #30620.
Fixes #30818
Blocked by #30761

TODO:

  • manual testing
  • update unit tests
  • feature detection

@google-cla google-cla bot added the cla: yes label Oct 13, 2020
@samouri samouri force-pushed the remove-video-vpcb branch 2 times, most recently from 8f71431 to 8cf8844 Compare October 13, 2020 21:13
@samouri samouri changed the title amp-video: remove all traces of viewportCallback AMP Video Players: use IntersectionObserver instead of viewportCallback + scroll detection. Oct 13, 2020
@samouri samouri marked this pull request as ready for review October 13, 2020 21:27
@amp-owners-bot
Copy link

Hey @alanorozco! These files were changed:

extensions/amp-3q-player/0.1/amp-3q-player.js
extensions/amp-nexxtv-player/0.1/amp-nexxtv-player.js
extensions/amp-ooyala-player/0.1/amp-ooyala-player.js
extensions/amp-powr-player/0.1/amp-powr-player.js
extensions/amp-wistia-player/0.1/amp-wistia-player.js

@samouri samouri requested review from dvoytenko and removed request for micajuine-ho October 13, 2020 21:28
@samouri samouri self-assigned this Oct 13, 2020
src/service/video-manager-impl.js Outdated Show resolved Hide resolved
src/service/video-manager-impl.js Outdated Show resolved Hide resolved
src/service/video-manager-impl.js Outdated Show resolved Hide resolved
@samouri
Copy link
Member Author

samouri commented Oct 20, 2020

I've extracted getViewportObserver() into #30761. Will rebase once that goes through

@samouri
Copy link
Member Author

samouri commented Oct 21, 2020

@alanorozco: can you please review this but ignore src/viewport-observer? It is being handled in a separate PR

@samouri
Copy link
Member Author

samouri commented Oct 27, 2020

@alanorozco: I plan on merging later today. Any feedback you leave before/after I'd be happy to followup with!

@samouri samouri merged commit 467a57a into ampproject:master Oct 27, 2020
@samouri samouri deleted the remove-video-vpcb branch October 27, 2020 19:03
ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
…ck + scroll detection. (ampproject#30647)

* amp-video: remove all traces of viewportCallback

* devAssert

* devAssert --> toWin
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.

AMP Ima Video pause upon scrolling page
3 participants