<Video> vs. <OffthreadVideo>
We offer two components for including other videos in your video: <Video /> and <OffthreadVideo />.
This page offers a comparison to help you decide which tag to use.
<OffthreadVideo />
Prefer <OffthreadVideo /> whenever possible.
A more sophisticated way of embedding a video, which:
- During preview: renders a HTML5
<video>tag. - While rendering: Extracts the exact frame outside the browser and displays it in an
<Img>tag.
Pros
✅ More videos can be displayed simulatenously as Chrome will not apply throttling.
✅ No flickers or duplicate frames in the output video can occur.
✅ Supports more codecs such as ProRes (only during render-time).
✅ Is usually faster to render.
Cons
⛔ The video needs to be downloaded fully before a frame can be rendered.
⛔ No ref can be attached to this element.
⛔ More work is required to loop a video. Check out: Looping an <Offthread> video.
⛔ Supports transparent videos only if the transparent is set which is a bit slower.
<Video />
Is based on the native HTML5 <video> element and therefore behaves similar to it.
Pros