Guest Posted July 23, 2020 Share Posted July 23, 2020 Site URL: http://goodstuff.ventures Hi, I made a background video using a mp4 in a code block. It works fine, expect on mobile - the video section / block "overflows" (I am not sure that is the right term) . It becomes larger than the whole site / body. I attach a screenshot so you understand my problem. Does anyone knows where that comes from? Thanks! Link to comment
ArminB Posted July 23, 2020 Share Posted July 23, 2020 what's the embedding code you used? About Armin: Squarespace Expert Profile: https://www.squarespace.com/designer/profile/3649084 Website: www.braunsberger-media.com Link to comment
Guest Posted July 23, 2020 Share Posted July 23, 2020 @ArminB I used this: <style> [data-section-id="5f114edc3ab5324738ed058b"]{ max-height: 95vh; overflow: hidden; } .content-hero h1 { color: #f9fd54; margin-bottom: 55px; } #myVideo { width: 100% !important; height: 100% !important; } [data-section-id="5f114edc3ab5324738ed058b"] .content-wrapper { padding: 0 !important; margin: 0 !important; } #block-yui_3_17_2_1_1594969762515_20105 { padding: 0 !important; } @media only screen and (max-width: 800px) { .content-hero h1 { margin: 0 30px; text-align: center;} #myVideo { width: 100vh !important; } } </style> <video id="myVideo"poster="https://static1.squarespace.com/static/5ddc36062f2ab265c0c5ebf7/t/5f101e0054a6c178b029b612/1594891776692/hero-bg.jpg" playsinline autoplay muted loop> <source src="https://static1.squarespace.com/static/5ddc36062f2ab265c0c5ebf7/t/5f101cc2ba11534213f6115b/1594891492904/gsv-bg.mp4" type="video/mp4"> <source src="https://static1.squarespace.com/static/5ddc36062f2ab265c0c5ebf7/t/5f0f151101621c4e444938f1/1594823977856/gsv-bg.webm" type="video/webm"> </video> Note that I removed some parts which have nothing to do with the video Link to comment
Guest Posted July 23, 2020 Share Posted July 23, 2020 Sorry I forgot I added the "overflow: hiddden;" after I posted the original message . It helped having the full website correctly displayed on mobile BUT the video still overflows.. I don't find the solution for that 😕 Link to comment
ArminB Posted July 23, 2020 Share Posted July 23, 2020 have you tried to simply add the video as "background video" to the page? like here: https://www.taliscapital.com About Armin: Squarespace Expert Profile: https://www.squarespace.com/designer/profile/3649084 Website: www.braunsberger-media.com Link to comment
Guest Posted July 23, 2020 Share Posted July 23, 2020 no , I did that at first but using youtube or vimeo is not an option. The video takes too long to load, that is why I made a custom code. EDIT: I only tried with youtube, the client do not have a pro vimeo account fyi Link to comment
ArminB Posted July 23, 2020 Share Posted July 23, 2020 I like your idea but It's definitely not loading faster (I'd even say slower than average) on my end. So I'd still go with the built-in solution. Hope that helps! About Armin: Squarespace Expert Profile: https://www.squarespace.com/designer/profile/3649084 Website: www.braunsberger-media.com Link to comment
Guest Posted July 23, 2020 Share Posted July 23, 2020 6 minutes ago, ArminB said: I like your idea but It's definitely not loading faster (I'd even say slower than average) on my end. So I'd still go with the built-in solution. Hope that helps! Thanks for the input - for me and other users I've tested with, it does load quicker than youtube (and it does not display a youtube logo which is nice too) . Unfortunately, I cannot test with vimeo as there is no trial for the pro account. The example you provided with vimeo works very well, perhaps I will just go that road (and that would simplify a LOT my life too!) Link to comment
ArminB Posted July 23, 2020 Share Posted July 23, 2020 sure! yes, I'm also making better experiences with Vimeo. All the best! About Armin: Squarespace Expert Profile: https://www.squarespace.com/designer/profile/3649084 Website: www.braunsberger-media.com Link to comment
Guest Posted July 23, 2020 Share Posted July 23, 2020 @ArminB I got a vimeo account to test and it still takes time to lad the video - a lot more than the example you sent (https://www.taliscapital.com). Some collegues tested it and same: taliscapital loads super fast, while https://www.goodstuff.ventures/home-1 takes ages. Could it be that the video is too big/not compressed enough? or something else I am missing? Link to comment
tuanphan Posted July 23, 2020 Share Posted July 23, 2020 Have you solved it yet? This morning I just solved a similar problem when using video tag 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 July 24, 2020 Share Posted July 24, 2020 16 hours ago, tuanphan said: Have you solved it yet? This morning I just solved a similar problem when using video tag @tuanphan No! I would be happy to hear how you solved it 🙂 Link to comment
Guest Posted July 26, 2020 Share Posted July 26, 2020 It works now - the last code I wrote seems to do the job : ) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.