Giter Club home page Giter Club logo

Comments (7)

moay avatar moay commented on September 2, 2024 1

As far as I can see, there are two problems that prevent this from working.

  1. There is a timing problem. When you try to access afterglow, it is not yet initiated. That is not such a big problem, as you can wait for that to happen.

  2. The video player does not kick in at the time when afterglow is initiated. It will be created when you open the lightbox. So the event should be bound whenever you open the lightbox. This is a problem, because there is (until now) no way to make this happen. So we'll need to make one.

I'll give it a shot!

from afterglow.

moay avatar moay commented on September 2, 2024 1

Just updated the community for this. Just bind the trigger click event, wait some time and then bind afterglow.

Community discussion here: https://community.afterglowplayer.com/d/91-ended-on-a-lightbox-video

I'll add some sort of shortcut for that in the future.

from afterglow.

moay avatar moay commented on September 2, 2024

I'll have a look into this, gimme a few hours...

from afterglow.

beausmith avatar beausmith commented on September 2, 2024

Rock on!

from afterglow.

Kzip avatar Kzip commented on September 2, 2024

Has there been any update on this? I'm still running into timing issues, I tried to bind an event (clicking on the anchor tag related to the lightbox) and running afterglow.init and seeing if that could work but I still can't do a redirect after a video finishes playing.

from afterglow.

beausmith avatar beausmith commented on September 2, 2024

@Kzip - I gave up and used another library. Sorry, I forget which library I switched to.

from afterglow.

moay avatar moay commented on September 2, 2024

Don't know if anybody is still on this. We do now (with v1.0) have a working event system, which solves the issue. You can (with v1.0, as soon as it is publicly available) now react to the afterglow events, which will also fire for lightboxes.

So, for instance:

afterglow.on('myplayerid', 'ended', function(){
    doSomething();
});

will execute doSomething() when the clip ended. Use the 'lightbox-closed' event for when the lightbox closes.

Please be aware that this wont work prior to v1.0.0b1. Let me know if there are any problems.

from afterglow.

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.