Comments (7)
As far as I can see, there are two problems that prevent this from working.
-
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.
-
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.
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.
I'll have a look into this, gimme a few hours...
from afterglow.
Rock on!
from afterglow.
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.
@Kzip - I gave up and used another library. Sorry, I forget which library I switched to.
from afterglow.
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)
- Getting started Integraton WIzard HOT 1
- afterglow.getPlayer('myvideo').play() do the scroll action HOT 2
- Missing control bar with Svelte
- Audio/Video Sync issue
- Any known problem with Bootstrap 4? HOT 5
- Sleep Mode HOT 1
- Multiple locally hosted videos on same page not working HOT 1
- AVI Support? HOT 1
- Uncaught TypeError: afterglow.getPlayer(...).pause is not a function HOT 2
- Problem with playing YouTube videos in Lightbox
- How to change YouTube APi controls. HOT 1
- How we can through video errors ? HOT 1
- Hi,
- Hi, how about running Hls video sources. HOT 1
- Hi ,please help me. HOT 1
- Change the position of the controls HOT 1
- How to change the font family of default control icons HOT 12
- Remove shadow inside player when adding poster or background-image HOT 1
- Video start but keep background image instead of video HOT 1
- Playlist ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from afterglow.