diff --git a/browsers/replays.mdx b/browsers/replays.mdx index 751bf89..1e341f2 100644 --- a/browsers/replays.mdx +++ b/browsers/replays.mdx @@ -237,3 +237,30 @@ func main() { } ``` + +## Embedding a replay + +Set an iframe's `src` to the `replay_view_url` returned when you start or list a replay. Give the iframe an explicit aspect ratio so the player keeps its shape while loading, and enable fullscreen playback. Merge the example's `frame-src` sources into your existing Content Security Policy. + +Replace `REPLAY_VIEW_URL` with the URL returned by the API: + +```html + + +
+ +
+``` + +Use the recorded browser's viewport ratio if it differs from `16 / 10`. Treat replay URLs as sensitive.