Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mediapipe/tasks/web/core/task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ export abstract class TaskRunner {
/** Configures the task with custom options. */
abstract setOptions(options: TaskRunnerOptions): Promise<void>;

/** Config graph for auto-resizing canvas. */
abstract setAutoResizeCanvas(isAutoResizeCanvas: boolean): void;

/**
* Applies the current set of options, including optionally any base options
* that have not been processed by the task implementation. The options are
Expand Down
5 changes: 5 additions & 0 deletions mediapipe/tasks/web/vision/core/vision_task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ export abstract class VisionTaskRunner extends TaskRunner {
super(graphRunner);
}

override setAutoResizeCanvas(
isAutoResizeCanvas: boolean): void {
this.graphRunner.setAutoResizeCanvas(isAutoResizeCanvas);
}

/**
* Configures the shared options of a vision task.
*
Expand Down