Corinne
(Corinne Savin)
August 3, 2017, 8:00am
1
Hi,
I’ve implemented fullpage.js code on my website, following this step by step:
I really need some help with an easy way to set up fullpage.js
Ideally a simple step by step guide would be very helpful.
I have looked through the forums and found similar topics but they seem to be more about the issues faced after installed and not the actual set up.
Any help would be greatly appreciated
J
Inside all the div’s I have a background video, and it’s not playing with the fullpage code.
public link: https://preview.webflow.com/preview/featureforward?preview=0e633dd84cdc24600a6804008b8653f9
I’m not sure why this is happening, background videos are supposed to auto play.
Any help would be much appreciated
Corinne
You can ask this Q also in Github (Fullpage.js). This is an issue with Fullpage.js and videos.
I dont see you added “fullpage.js” libary!!
Supports npm, GitHub, WordPress, Deno, and more. Largest network and best performance among all CDNs. Serving more than 80 billion requests per month. Built for production use.
Also add the publish HTML (in edit mode its impossible to see how Outer assets works - you should test the public version)
Related issues:
https://github.com/alvarotrigo/fullPage.js/blob/master/examples/backgroundVideo.html
https://stackoverflow.com/questions/40332936/html5-video-autoplay-not-working-with-fullpage-js
http://jsfiddle.net/97tbk/1428/
1 Like
Corinne
(Corinne Savin)
August 6, 2017, 8:14am
3
Thanks @Siton_Systems , I added the fullpage.js in the custom code section of the project settings, like it says in the step-by-step tutorial. You can see it works in the link: featureforward.webflow.io
I tried adding the code from Github but don’t see any difference
Corinne
(Corinne Savin)
August 7, 2017, 9:32am
4
@Siton_Systems I’ve looked at the instructions on Github but I’m not sure where to use it and how in the Webflow designer.
There’s also a problem with this script and interactions (none of them work on scroll).
I’m not very good with Java Script, does anyone know how to solve this?
Thanks!
samliew
(webflowexpert.com)
August 7, 2017, 10:31am
5
Paste this after the line where you initialize fullpage.
$('video').each((i,v) => v.play());
1 Like
Corinne
(Corinne Savin)
August 7, 2017, 2:34pm
6
thanks @samliew I tried to paste that code inside the script but it doesn’t work…
samliew
(webflowexpert.com)
August 7, 2017, 2:38pm
7
This is where you initialize fullpage
<script>
$(document).ready(function() {
$('#fullpage').fullpage(); // <-- THIS LINE
// PUT CODE HERE
});
</script>
// <-- ANYTHING AFTER THIS IS A COMMENT
Corinne
(Corinne Savin)
August 14, 2017, 11:55am
8
Thanks @samliew !
It works now when the site is loaded, and when scrolling down on the page, but if I scroll back up again the videos stop. Any idea how it can keep on looping all the time?
samliew
(webflowexpert.com)
August 14, 2017, 12:49pm
9
Corinne
(Corinne Savin)
August 15, 2017, 5:30am
10
Thanks @samliew it works now!
Corinne
(Corinne Savin)
August 16, 2017, 8:50am
11
I added this code after initializing fullpage.js:
The vidoes keep on playing but the fullpage.js stopped working
@samliew What am I doing wrong?
samliew
(webflowexpert.com)
August 16, 2017, 9:06am
12
Based on the documentation, you are supposed to add custom attributes to the video element. The code should already be perfect.
Corinne
(Corinne Savin)
August 17, 2017, 6:08am
13
@samliew It all worked before I added the ‘video data-keepplaying’
Should the ‘video data-keepplaying’ be added to the video element itself?
Corinne
(Corinne Savin)
August 17, 2017, 7:53am
15
@samliew so the video should get a unique ID?
Are you sure I put in the right code? It makes the fullpage effect stop working so I suspect something is wrong with the code itself. When I erase this part the fullpage continues to work (the videos stop).
samliew
(webflowexpert.com)
August 17, 2017, 9:11am
16
<script>
$(document).ready(function() {
$('video').each((i,v) => { $(v).attr('data-keepplaying', ''); v.play(); });
$('#fullpage').fullpage();
});
</script>
2 Likes
Corinne
(Corinne Savin)
August 17, 2017, 10:05am
17
@samliew thanks so much for your help!
I implemented the code exactly like you wrote it, the videos work, but again the fullpage.js isn’t working
here: http://featureforward.webflow.io
This is the code I put in the before /body tag
<script type="text/javascript" src="https://cdn.rawgit.com/alvarotrigo/fullPage.js/master/jquery.fullPage.js"> $(document).ready(function() {
$('video').each((i,v) => { $(v).attr('data-keepplaying', ''); v.play(); });
$('#fullpage').fullpage();});</script>
samliew
(webflowexpert.com)
August 17, 2017, 7:08pm
18
You need a separate script tag for the js file. Don’t combine.
1 Like
Corinne
(Corinne Savin)
August 18, 2017, 8:04am
19
Thank you @samliew ! I finally got it right
matt-hew
(matt hew)
November 5, 2020, 12:43am
20
How did you get this to work - I did everything you have done? this is my code.
/* JS CODE */
< script type=“text/javascript”>
jQuery(document).ready(function($) {
$ (‘video’).each((i,v) => { $(v).attr(‘data-keepplaying’, ‘’); v.play(); });
$ (‘#fullpage ’).fullpage({
scrollingSpeed: 1000,
navigation: true,
slidesNavigation: true,
});
//methods
$.fn.fullpage.setAllowScrolling(true);
});
/* HTML */
< script src=“https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/3.0.4/fullpage.js ”>< /script>
< script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/3.0.4/fullpage.extensions.min.js">< /script>
/* HTML */
< div id=“fullpage”>
< div class=“section”>
< div class=“section”>
< div class=“section”>
</ div>
p.s. i know i have spaced in the tags