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';
33import type { ReplayConfiguration } from './types' ;
44
55interface ReplayCanvasOptions {
6- fps : number ;
7- quality : number ;
6+ quality : 'low' | 'medium' | 'high' ;
87}
98
109/** An integration to add canvas recording to replay. */
@@ -21,14 +20,10 @@ export class ReplayCanvas implements Integration {
2120
2221 private _canvasOptions : ReplayCanvasOptions ;
2322
24- public constructor ( ) {
23+ public constructor ( options ?: Partial < ReplayCanvasOptions > ) {
2524 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
2925 this . _canvasOptions = {
30- fps : 4 ,
31- quality : 0.6 ,
26+ quality : options && options . quality || 'medium' ,
3227 } ;
3328 }
3429
@@ -47,6 +42,7 @@ export class ReplayCanvas implements Integration {
4742 canvas : {
4843 ...this . _canvasOptions ,
4944 manager : getCanvasManager ,
45+ quality : this . _canvasOptions . quality ,
5046 } ,
5147 } ,
5248 } ;
You can’t perform that action at this time.
0 commit comments