This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Joe Lifrieri
Posted Apr 23 - Read on Facebook

Having a perf problem related to videos that I'm not sure how to solve.

I'm scrolling a feed of content. When you hit a certain scroll position, a video in the feed of content begins playing.

All of this works very well, with one snag: when previewing my prototype on an iOS device (via Frameless), once a video starts playing, there's a brief stutter. For about half a second, the video goes black, the feed stops scrolling, and everything hangs.

Is there any way to make starting/stopping a video on a device more performant? Are there any tricks to make the gap between pre-playback and playback less noticeable? Thanks so much.

13 Comments

George Kedenburg III

did you try maybe playing the video for a half a second when the prototype loads, and then immediately pausing until you hit your scroll point? im assuming the hang is because the browser isn't downloading the video until its playing, so this may trick it into downloading sooner

Joe Lifrieri

hahaha George that's awesome

George Kedenburg III

did it work

Joe Lifrieri

It helped a little, but even after the video has loaded, playing/pausing definitely causes some scroll stutter.

George Kedenburg III

are these full videos? cutting them down and getting a little more aggressive with the file size might help too...

Joe Lifrieri

i got them each down to 30s, but maybe i should go for less than 10…

George Kedenburg III

how are they encoded? h.264?

Joe Lifrieri

yep!

Joe Lifrieri

Setting autoplay to true on all video elements and pausing them all after .5s worked really well, actually. I also reduced the file size by a lot and it eliminated some of the stuttering. I'm going to screw around with it a bit more, but yeah, its related to downloading and file size.

George Kedenburg III

Attila Oláh

George Kedenburg III Which sticker pack is this?

Jordan Robert Dobson

Read the entire post on Facebook