From 2d57c610f9e77b8ef2f9cb0aca17c85d92c9864d Mon Sep 17 00:00:00 2001 From: Justin Halsall Date: Mon, 3 Oct 2022 11:51:40 +0200 Subject: [PATCH] Add maxScale to rrwebPlayer types and add docs to others --- packages/rrweb-player/typings/index.d.ts | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/packages/rrweb-player/typings/index.d.ts b/packages/rrweb-player/typings/index.d.ts index 7412448170..6d15307bde 100644 --- a/packages/rrweb-player/typings/index.d.ts +++ b/packages/rrweb-player/typings/index.d.ts @@ -5,13 +5,50 @@ import { SvelteComponent } from 'svelte'; export type RRwebPlayerOptions = { target: HTMLElement; props: { + /** + * The events to replay. + * @default `[]` + */ events: eventWithTime[]; + /** + * The width of the replayer + * @defaultValue `1024` + */ width?: number; + /** + * The height of the replayer + * @defaultValue `576` + */ height?: number; + /** + * The maximum scale of the replayer (1 = 100%). Set to 0 for unlimited + * @defaultValue `1` + */ + maxScale?: number; + /** + * Whether to autoplay + * @defaultValue `true` + */ autoPlay?: boolean; + /** + * The default speed to play at + * @defaultValue `1` + */ speed?: number; + /** + * Speed options in UI + * @defaultValue `[1, 2, 4, 8]` + */ speedOption?: number[]; + /** + * Whether to show the controller UI + * @defaultValue `true` + */ showController?: boolean; + /** + * Customize the custom events style with a key-value map + * @defaultValue `{}` + */ tags?: Record; } & Partial; };