I would still LOVE your videos to be added too using custom Interactions, I am hoping this will not replace videos, as I find videos great to follow.
The interactions from us all adding on these pages will be amazing and can not wait to see how this expands over time ! - my next question is a further step from number 1 is would you be able to do videos using users ideas on here and of course credit them on the thumb-nail and YouTube/video of the interaction is one that is warrant a video being done on ?
@Norm Wouldn’t it be great to be able to select the direction “up” and “down” in the “Scroll Y” option in the Interaction Manager, then you could make content disappear and reappear when scrolling (e.g. when scrolling down the navigation bar hides and when scrolling up it shows up again). Or would this be possible in another way? I haven’t managed it yet . I’ll probably have to experiment further .
Add sticky as property with if visible … ie … when a div is visible an element in it become sticky and when div is not visible the property sticky is remove …
A very random question and one which I maybe be asking a stupid question here !!! (it won’t be the first !!)
I have several websites where I have a small video playing in the background on loop on desktop and tablet mode, but takes too long to load on mobile so I have an image on that and set it to show that on mobile only and the videos on the large breakpoint.
On doing this the only issue is, it still loads in the background and slows down the mobile page from loading as fast as it should.
Doing this always gives me great scores on desktop on google page speed etc…and on mobile saying the video is the issue causing it to get a much lower score.
My question is - with Custom Interactions is there anyway to only let video play on larger breakpoints and 100% STOP load on mobile, even in the background?
I have been told code can do it…but could this !?
This will stop the video auto loading an playing. Then you can use a custom interaction that is run when the page loads to play the video, but only if the OS is Windows or MacOS using an if statement.
Or you could follow this tutorial video and instead of targeting Windows vs Mac. Target iOS and Android and remove the video when the page loads by giving the video an ID and using the remove element interaction rule.
Thanks @Norm - I’m still half asleep so will look again later! But I think your saying I can target the videos to play on mac&windows only and not on android & iOS.
Guess I just stuck the image in and it will show that Instead or do I need to tell it to show that only?
100% a test for me once I’ve finished this website I’m on!
Can’t wait to try it. Thanks @Norm (right back to bed….2hrs sleep ain’t good!)
Quick question on this, if you have for mobile a background video set to stop on autoplay for mobile view, is still loading/caching but not playing or will it stop loading completey? Just thinking of mobile data in this instance. I have done this in the past with a different system that uses php to detect device and browser type that prevents it being served in the first instance. I’ve got a project on at the moment where this would be useful for a video background in desktop and tablet but don’t want to have a strain on a users mobile data. Tah.
If you use disable the preload option on the video (as I mentioned above) this stops the video loading as part of the webpage. The video will be loaded once you press pay.
Or when an custom interaction triggers the playing of the video.
The first two if statements check for iOS or Android and remove the video background (which has the ID my-video) . After this I’ve added a stop rule to prevent any further interaction rules running past this point.
If the visitors device doesn’t match the first two if statement then the interactions skips those parts and goes to the last rule which will make the video background play.
If you preview in Blocs the video will show regardless of viewport size as it’s being shown on MacOS, however, if you use the AirDrop preview share option in Blocs and preview on your iPhone, there should be no video background.
Because preload is disabled, this should prevent the video slowing down the loading time on mobile where it is not needed.