# Highlight clips Source: https://tehoclient.dev/modules/clips SDK: 1.0.0 Your server knows when something great happens: a clutch, a final kill, a record run. Mark the moment, and every player who has the replay buffer turned on gets a clip saved, covering a few seconds before and after. ## Mark a moment ```java teho.clips().mark("final-kill-" + matchId, "Final kill on Lighthouse", 8000, 3000) .thenAccept(clip -> { if (clip.saved()) { stats.recordClip(teho.uniqueId(), clip.id()); } }); ``` The arguments are an id, a title, how much to keep before the moment (up to 60 seconds) and after it (up to 30 seconds). The future completes once the clip is written. | `ClipsApi.Clip` | Notes | |---|---| | `saved()` | Whether a clip was written. | | `id()` | Your id. | | `url()` | Where the clip ended up, when there is one. | | `error()` | Why not, for example when the player has the replay buffer off. | ## What the player gets Players opt in to the replay buffer in Settings -> Servers. Clips are MJPEG `.avi` files in the game folder under `teho-clips`, named with a timestamp and your title. Players who have it off get nothing, and your future completes with `saved() == false`. ## No code ```text /tehoapi clip * Grand final ```