File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ import type { Integration } from '@sentry/types';
3
3
import type { ReplayConfiguration } from './types' ;
4
4
5
5
interface ReplayCanvasOptions {
6
- fps : number ;
7
- quality : number ;
6
+ quality : 'low' | 'medium' | 'high' ;
8
7
}
9
8
10
9
/** An integration to add canvas recording to replay. */
@@ -21,14 +20,10 @@ export class ReplayCanvas implements Integration {
21
20
22
21
private _canvasOptions : ReplayCanvasOptions ;
23
22
24
- public constructor ( ) {
23
+ public constructor ( options ?: Partial < ReplayCanvasOptions > ) {
25
24
this . name = ReplayCanvas . id ;
26
- // TODO FN: Allow to configure this
27
- // But since we haven't finalized how to configure this, this is predefined for now
28
- // to avoid breaking changes
29
25
this . _canvasOptions = {
30
- fps : 4 ,
31
- quality : 0.6 ,
26
+ quality : options && options . quality || 'medium' ,
32
27
} ;
33
28
}
34
29
@@ -47,6 +42,7 @@ export class ReplayCanvas implements Integration {
47
42
canvas : {
48
43
...this . _canvasOptions ,
49
44
manager : getCanvasManager ,
45
+ quality : this . _canvasOptions . quality ,
50
46
} ,
51
47
} ,
52
48
} ;
You can’t perform that action at this time.
0 commit comments