What's your biggest current challenge? Have your say in Community Polls along the right column.

Mobile and desktop video

Solved

Mobile and desktop video

kaankurt25
Tourist
11 0 1

I am trying to adapt my videos to full capture the screen on desktop and on mobile. Mobile cuts short and the desktop has some more room left. Can someone help? I have tried to go through other people's discussion post who got help but none of the codes seem to work. I don't know if I am doing something wrong or not.

Accepted Solution (1)
tim
Shopify Partner
3911 394 1435

This is an accepted solution.

This can go into "Custom CSS" setting of this section:

.video-section .video-section__media {
  height: calc(100vh - 76px);
  width: 100%;
  padding-bottom: 0;
}
@media (max-width:990px){
  .video-section .video-section__media {
    height: calc(100vh - 68px);
  }
}

It's not the best because the height of the header changes 76 px on desktop and 68px on mobile

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 9 (9)
kaankurt25
Tourist
11 0 1

I am using a 16:9 resolution on my video. I want my video to fill the mobile screen and keep the desktop display,

kaankurt25
Tourist
11 0 1

Where could I find that part? I cannot seem to find it

tim
Shopify Partner
3911 394 1435

You need to share a (preview) link to the page you're working on.

The solution is theme-dependent and may differ between sections.

Also, one can't expect the 16:9 video to cover entire mobile screen which is 9:16 without cropping, which will be significant in this case.

You may need to have separate videos for landscape (desktop) and mobile (portrait).

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
kaankurt25
Tourist
11 0 1

aldoresavant.com is my website. Password is: aldore

kaankurt25
Tourist
11 0 1

David, I do not see the code you are mentioning

tim
Shopify Partner
3911 394 1435

This is an accepted solution.

This can go into "Custom CSS" setting of this section:

.video-section .video-section__media {
  height: calc(100vh - 76px);
  width: 100%;
  padding-bottom: 0;
}
@media (max-width:990px){
  .video-section .video-section__media {
    height: calc(100vh - 68px);
  }
}

It's not the best because the height of the header changes 76 px on desktop and 68px on mobile

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
tim
Shopify Partner
3911 394 1435

If you set your header to Sticky: Always, i believe it will be simpler:

.video-section .video-section__media {
  height:100vh;
  width: 100%;
  padding-bottom: 0;
}

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
kaankurt25
Tourist
11 0 1

That worked perfectly! The header was not changed at all. Thank you!!

tim
Shopify Partner
3911 394 1435

I mean, header originally has different height on mobile and desktop, so I had to account for this in my code.

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com