Waymark Plugin — Variations
Variations lets a user finish several versions of a video at once: the video they made, plus versions of it in other aspect ratios and durations. Each video is still completed, rendered and delivered individually, through the same client-side events and webhooks as a video finished on its own.
How it works
- The user clicks "Next" in the editor.
- They either choose "Just render this video", or generate other formats of the video.
- If they generated other formats, they pick the videos they want and click the "Finish" button (for example, "Finish 3 videos").
- Waymark purchases and renders each selected video.
Every video finished together has the same pack value. A video finished on its
own, including when the user picks only one video to finish, has a pack of null, as does a video that hasn't been
finished yet.
If Variations isn't available for a video, clicking "Next" finishes the video right away.
Enabling Variations
Variations is a paid feature, available for supported templates. To enable it for your partner account, contact your Waymark support team.
What you need to do
Variations works with your existing integration. There are no new methods, endpoints or event registrations, and your integration doesn't create packs: Waymark assigns one when the user finishes several videos together.
- Allow the
packfield.VideoDataand the video data in webhook payloads now include apackkey, which is always present and may benull. If you validate event data or webhook payloads against a strict schema that rejects unknown fields, allowpack. Webhook payloads include it whichever SDK version you use, and event data may include it on earlier SDK versions too. - Don't assume one video per editing session. A single finish can complete several videos, including videos you
haven't seen a
videoCreatedevent for. If you end the user's session when avideoCompletedevent arrives, wait for theeditorExitedevent instead.
We also recommend updating to version 4.2.1-beta.0 of the SDK, which adds the pack field to the
TypeScript typings. Nothing else in the SDK has changed, so this is only needed if you use the typings.
Optional: group videos finished together
If you want to show or track videos finished together as a group, use pack.id to group them and pack.size to know
how many videos to expect. See Finishing several videos together for
the client-side events, and Videos finished together for webhooks.
Tip
Client-side events are only emitted while the Plugin is loaded on the page. To reliably receive every video and render, use webhooks.