Hi Webflow -
Using video embeds in multiple places on my site. Works great on Desktop.
Being a big dummy, I didn’t realize this wouldn’t work in mobile.
So I guess I have to have 2 embeds.
one for desktop with custom code to auto-play, like this:
<iframe src="https://player.vimeo.com/video/185420819?background=1" title=0&byline=0&portrait=0" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="https://vimeo.com/185420819">cbbq website scroll</a> from <a href="https://vimeo.com/user6825633">scott barbey</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
and one like this on tablet/phone like this:
<iframe src="https://player.vimeo.com/video/185420819? title=0&byline=0&portrait=0" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="https://vimeo.com/185420819">cbbq website scroll</a> from <a href="https://vimeo.com/user6825633">scott barbey</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
BUT - How? Do I need to create a second DIV holder/embed unit with the “B” version on desktop and make it invisible - and then swap invisibles on lower mobile breaks? UGH!
Actually it now works fine on iOS—you can use the same code in all instances. You might want to upload your video on a separate page using Webflow (instead of Vimeo). This will create MP4 and WEBM files and host them automatically.
Hi Mr. McGuire -
Super happy to learn IOS now support pre-playing video on load. Awesome news.
Also - really appreciate the help.
But - not 100% clear yet…
are you suggesting instead of an embed – I bring in a video using the VIDEO element?
than applying the above code to the video?
If so, am I applying the whole code and just replacing the URL part?
Where do I get the new URL part? Don’t I only add URL code for an embed?
While I can try this - ALL my videos are already on VIMEO. soooo wish that would work. would be a lot easier.
The code above requires a direct link to a video file. I know Vimeo PRO supports this, though you’d have to research what levels of their service support this feature.
To do it in Webflow, create a separate page, create a background video element, upload your video, and publish the site (.webflow.io works fine). Visit that page on the published site, right click the video, and inspect. You should be able to drill down in the code to the specific URLs above (WEBM, MP4, and the background image/poster).
Took a bit of head-scratching, but I think I get it now.
One last question… about “WEBM” –
From what I understand, they are akin to GIFs - a series of still images
that play in order.
Some of the movies I want to play at load are longer than others. Any
concerns on length relative to functional “playing”?
Longest video may be 1.5 minutes. will the converted WEBM work at this
length?
(Note: all of these are to be used “small” on screen. NOT as full screen
video.)