Jump to content

Video aspect ratio code not working

Recommended Posts

Hello,

I'm trying to change the aspect ratio of an uploaded video to a square. I've found several snippets of code from others trying to accomplish something simple, but none of them seem to work. They all either simply make the video smaller or just add a whole ton of padding above or below the video—the aspect ratio stays the same. Here's an example of a couple of the codes I tried:

 

#block-156fd3188f8821e785a1.video-block .video-player{
padding-bottom:120%
}


#block-156fd3188f8821e785a1 .sqs-native-video .native-video-player {
    padding-top: 15.625%;
}

 

The percents are random, just trying to test how to actually crop the video instead of resize.

 

Site PW is 'financial'


Thank you for any insight or tips.

Edited by john-1988
Added website and pw
Link to comment
  • Replies 4
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi please share website url and where the video is located so the community can check and see how to help you?

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Nerd
e: melody@melodylee.tech


💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
🧰 See the tools I use (contain affiliate links)
 Did I help? I like coffee (Thank you)

Link to comment
On 12/17/2023 at 3:04 PM, john-1988 said:

I'm trying to change the aspect ratio of an uploaded video to a square. 

Hi, do you want to:

1) squish your video to fit a square?

2) crop your video to fit a square?

On 12/17/2023 at 3:04 PM, john-1988 said:

They all either simply make the video smaller or just add a whole ton of padding above or below the video—the aspect ratio stays the same.

Do you want to keep the aspect ratio of your video? If not, it will look distorted.

 

Edit: probably best if you crop your video to a square before uploading? The code snippets you've tried above are to modify how much space a video block takes up, rather than editing a video.

Edited by melody495

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Nerd
e: melody@melodylee.tech


💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Website help <- send me your to-do list. From code to plugin to domain setup.
🧰 See the tools I use (contain affiliate links)
 Did I help? I like coffee (Thank you)

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.