Coder Social home page Coder Social logo

Comments (8)

alvarotrigo avatar alvarotrigo commented on June 18, 2024

This is a limitation on the browser side.
The parent page can't capture events that happens on the child page (the youtube iframe embed)

It's a duplicate of this issue.

The solution is to use your CSS solution using pointer-events together with some JS that disables them when the user clicks on the video. So at least the 2nd click the user does will be effective :)

Another workaround as suggested in the referenced issue, is using an overlay.

from fullpage.js.

halukkaramete avatar halukkaramete commented on June 18, 2024

from fullpage.js.

alvarotrigo avatar alvarotrigo commented on June 18, 2024

The Entire youtube shorts phenomena ( https://www.youtube.com/shorts ) is the best example of this.

Not a great example.
They are not using iframes (embeds). And even if they did, they are iframes on the same domain so there's no cross domain policies in place there. (although I'm not even sure this matters...)

It appears to me that fullpage CSS or events are introducing something for
this to occur?

Nope.
I already explained the problem. fullPage.js can't have access to the events fired inside an iframe.

You can read more on this Mozilla issue.

from fullpage.js.

alvarotrigo avatar alvarotrigo commented on June 18, 2024

Here you have full reproduction of the issue proving it's a browser limitation:
https://jsfiddle.net/8cj0dofx/1/

But hey, if you know how to overcome it, I'll be all ears :)

from fullpage.js.

halukkaramete avatar halukkaramete commented on June 18, 2024

from fullpage.js.

alvarotrigo avatar alvarotrigo commented on June 18, 2024

Let me know once you manage to capture mousewheel events on the iframe of this example:
https://jsfiddle.net/8cj0dofx/1/

Once you do that, I'll be happy to implement it in fullPage ;)

Until then, I'm afraid I can't really help you any further.

from fullpage.js.

halukkaramete avatar halukkaramete commented on June 18, 2024

from fullpage.js.

alvarotrigo avatar alvarotrigo commented on June 18, 2024

We're talking strictly youtube embed iframes.

Feel free to replace the iframe for a youtube embed. It won't matter.
The mousewheel event won't get propagated either.

from fullpage.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.