elevation Posted January 28, 2021 Share Posted January 28, 2021 Site URL: http://thisiselevation.com On our site, we have a video banner at the top of the home page that loads a Vimeo link. We want to be able to load one of three different videos randomly on refresh of the page. Does anyone know how this can be achieved? Link to comment
tuanphan Posted February 2, 2021 Share Posted February 2, 2021 Hi. Do you use Personal or Business Plan? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
elevation Posted February 17, 2021 Author Share Posted February 17, 2021 It's a business plan. Link to comment
Guest Posted February 22, 2021 Share Posted February 22, 2021 hi, im also very interested in this question. I want to load random embedded youtube content on my landingpage. Link to comment
tuanphan Posted February 27, 2021 Share Posted February 27, 2021 On 2/18/2021 at 1:44 AM, elevation said: It's a business plan. On 2/22/2021 at 6:36 PM, olaastrand2 said: hi, im also very interested in this question. I want to load random embedded youtube content on my landingpage. Hi. Sorry for the delay. You can use Code Block to create background. Thus, you can achieve this effect easily. I search & found this effect. If you like this, I will test something to convert it to Code Block in Squarespace. Link: https://codepen.io/team/rcrooks1969/pen/oENWJj Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Guest Posted May 10, 2021 Share Posted May 10, 2021 Trying the reference site you posted above... must be missing something. On SS7.1 and would like to do the same. Need to have a different video load behind the main code block on our website on each visit. Website for example is https://voyr.me Link to comment
tuanphan Posted May 12, 2021 Share Posted May 12, 2021 On 5/10/2021 at 4:59 PM, dsiles said: Trying the reference site you posted above... must be missing something. On SS7.1 and would like to do the same. Need to have a different video load behind the main code block on our website on each visit. Website for example is https://voyr.me Which code did you add? Can you share link to page (your site) where you added code? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
danny1 Posted June 10, 2021 Share Posted June 10, 2021 Was there ever an update/solution for this? Would also love to figure this out! Link to comment
joeridecock Posted July 19, 2023 Share Posted July 19, 2023 Hello! I recently had the same question. On the homepage of a website of mine, I had a video background using a Vimeo link. I wanted that video to switch randomly with other Vimeo videos on refresh. I succeeded by using the script below, which you need to paste into the header section of code injection. Change the provisional videoIDs (000000001 and 000000002) with the videoIDs of the Vimeo videos you want to target, and feel free to add more after the comma. Under fallbackVideo, you can specify a fallback video in the same way. Good luck. <!-- VIDEO BACKGROUND --> <script> window.onload = function() { var videoIDs = ['000000001', '000000002']; var fallbackVideo = '000000000'; var randomID = videoIDs[Math.floor(Math.random() * videoIDs.length)]; var vimeoPlayer = document.getElementById('vimeoplayer'); vimeoPlayer.onerror = function() { vimeoPlayer.src = '//player.vimeo.com/video/' + fallbackVideo + '?api=1&background=1'; } vimeoPlayer.src = '//player.vimeo.com/video/' + randomID + '?api=1&background=1'; } </script> tuanphan 1 Joeri De Cock Founder & Brand Designer Lichterlaaie™ Branding Studio www.lichterlaaie.studio hi@lichterlaaie.studio Link to comment
VeeBee Posted October 2, 2023 Share Posted October 2, 2023 @joeridecock Do you know if this would work using YouTube videos somehow? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment