Hello,
we're trying to pause/play a video in the current slide or section.
Any hint how to achieve this? We've tried for days now....the "afterLoad" and "afterSlideLoad" Events are firing several times when a page is deeplinked :( we#ve also added the "footer"-hack which causes the slideIndex to mess up? Isn't there an easy way to start a video in the current slide or section and to pause all others? Thanks a lot!
the "afterLoad" and "afterSlideLoad" Events are firing several times when a page is deeplinked
What do you mean by _deeplinked_ ?
we#ve also added the "footer"-hack which
What is the footer hack?
Isn't there an easy way to start a video in the current slide or section and to pause all others?
fullPage.js automatically plays HTML 5 videos when you enter in the section / slide with them if they have the autoplay property.
For example:
<video autoplay loop muted controls="false" id="myVideo">
<source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
<source src="http://www.w3schools.com/html/mov_bbb.ogg" type="video/ogg">
</video>
Regarding the pause, it seems you've discovered a bug. They should be paused automatically when you leave the section / slide.
Thanks a lot. Is there perhaps a quick fix / workarround for this?
Best
P.
Fixed in the dev branch. Just download fullpage.js from there.
Will be merged in a near future.
Thanks a lot, but there seems to be a little glitch, When a video is embeded for example i the second slide , the sound already plays when entering the section an viewing the first slide....
How could I solve this?
Right I see. I'll take a look at it in the next few days.
Solved in fullpage.js 2.7.6.
Is it possible to toggle this behaviour in the configuration?
I have some audio element on a slide, which i want to keep playing on the whole site.
If you want to play in on page load, then just use the standard autoplay.
Then i fyou want to keep it playing even after section/slide leave, use data-keeplaying. As detailed in the docs.
oh thank you, must have overlooked that in the docs
however, that does not work. maybe because i'm not using the audio-tag directly but via audio.js. i'll see