Jump to content

Can I play a different background video for mobile?

Go to solution Solved by rwp,

Recommended Posts

Thanks rwp!!

That's awesome!!!

On a related note, on that same page, the mobile font isn't exactly how I want it to be.

I have this code below in my Custom CSS that does a nice job of reducing the title font for mobile, but it doesn't appear to affect the top 2 words of the title ('South Florida'). Also, that text is within a markdown box, which is perhaps a part of my issue?

 

@media screen and (max-width:640px) {
h3 span {font-size: 36px !important;}
}

Link to comment

Thanks rwp!!

That's awesome!!!

Also, how do I do this on more than one page?

And on a related note, on that same page, the mobile font isn't exactly how I want it to be.

I have this code below in my Custom CSS that does a nice job of reducing the title font for mobile, but it doesn't appear to affect the top 2 words of the title ('South Florida'). Also, that text is within a markdown box, which is perhaps a part of my issue?

 

@media screen and (max-width:640px) {
h3 span {font-size: 36px !important;}
}

Link to comment

That doesn't seem to be working for me.

This is my whole Custom CSS right now:

 

@media screen and (max-width:640px) {
    #block-yui_3_17_2_1_1600516236805_10107 h3 {
        font-size: 56px !important;
    }

    h3 span {
        font-size: 36px !important;
    }
}  

@media screen and (max-width:1024px) {
  [data-section-id="5f5beacf1cb1680c6b76bcb1"] {
    display: none !important;
  }
}

@media screen and (min-width:1025px) {
  [data-section-id="5f7104719344cd07a2ef3145"] {
    display: none !important;
  }
}

Link to comment

And to tempt fate...

How could I do the hidden video trick for 2 more pages?

Now I have dual video sections on the 'Services' and the 'About' pages. Hoping to make the lower video sections only for mobile.

Your code is great, but a bit obtuse for my brain to reverse engineer.

Help please thank you!

Edited by DrMSacks
grammar
Link to comment
  • 4 months later...

@rba

Please post the URL for your site.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 1 month later...
22 hours ago, joshroos said:

@creedon @rwp @tuanphan

Trying to do the same thing here, one background video that loads for desktop (this is already on my site) and a different compressed version that loads for mobile. 

Site is : roosbrothers.com

What code is necessary to do so and where should I host the mobile background video?

Thanks!

You can add 2 videos, then we will give the code to show 1 on desktop, show 1 on mobile.

Or if 2 videos make page slowly loading, we can use code to redirect to new page on mobile only?

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
On 4/15/2021 at 7:41 AM, tuanphan said:

You can add 2 videos, then we will give the code to show 1 on desktop, show 1 on mobile.

Or if 2 videos make page slowly loading, we can use code to redirect to new page on mobile only?

@tuanphan Where should I host the 2nd video? It's on Vimeo, does it need to be embedded into my site?

What I am trying to achieve is to have one video (full-res) play on desktop, and the same video (but compressed) so it loads quicker and easier on mobile. 

 

 

Edited by joshroos
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.