civiccc / civiccc/react-waypoint

Wrong behavior in YouTube video fullscreen mode

Open
#198 2 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
JavaScript
Stars
4k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have several sections one below the other. My waypoint component is positioned right after the first section. One of the last sections contains an embedded YouTube video. When I load the page the waypoint component fires once

`Object {currentPosition: "inside", previousPosition: undefined, event: null, waypointTop: 0, waypointBottom: 685…}`

and when I scroll down to the mentioned YouTube section, it fires again

`Object {currentPosition: "above", previousPosition: "inside", event: Event, waypointTop: -694, waypointBottom: -9…}`

So far, so good.

When I play the embedded YouTube video **and then switch to fullscreen mode** (the latter is the important thing), then the waypoint component fires as if the user has scrolled up again

`Object {currentPosition: "inside", previousPosition: "above", event: Event, waypointTop: 0, waypointBottom: 685…}`

Once I left the fullscreen mode of the YouTube video again, another waypoint event is fired according to the current scroll position that we actually had all the time

`Object {currentPosition: "above", previousPosition: "inside", event: Event, waypointTop: -3100, waypointBottom: -2415…}`

In my case this wrongly fired waypoint event is quite critical since it starts/stops the autoplay of a main slider at the page top which changes the whole content below on slide change. For this reason I can see a YouTube video in fullscreen mode for only a few seconds until it's just gone/it has been replaced with new content.

Could you please try to fix the waypoint behavior in fullscreen mode?

Best
Sascha

PS: Behavior found in Chrome (desktop and mobile)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.