Skip to content

Commit 30ea327

Browse files
committed
Adjust naming
1 parent b4b4a6a commit 30ea327

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/wrappers/visuals/userMedia.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ class UserMedia extends Despot {
366366

367367
public createCanvas() {
368368
const canvas = document.createElement("canvas");
369-
const dimension = this.getRawWidth(true);
369+
const rawWidthDimension = this.getRawWidth(true);
370370

371-
if (dimension.value) {
372-
canvas.width = dimension.value;
371+
if (rawWidthDimension.value) {
372+
canvas.width = rawWidthDimension.value;
373373
}
374374

375375
const rawHeight = this.getRawHeight(true);
@@ -405,7 +405,7 @@ class UserMedia extends Despot {
405405

406406
public getRawWidth(responsive: boolean) {
407407
let rawWidth = this.getVideoWidth();
408-
const dimension: Dimension = { unit: "px" };
408+
const widthDimension: Dimension = { unit: "px" };
409409

410410
if (this.options.video.width || this.options.video.height) {
411411
if (!responsive) {
@@ -417,13 +417,13 @@ class UserMedia extends Despot {
417417
}
418418

419419
if (responsive) {
420-
const dimension = this.recorder.limitWidth(rawWidth);
421-
rawWidth = dimension?.value;
420+
const widthDimension = this.recorder.limitWidth(rawWidth);
421+
rawWidth = widthDimension?.value;
422422
}
423423

424-
dimension.value = rawWidth;
424+
widthDimension.value = rawWidth;
425425

426-
return dimension;
426+
return widthDimension;
427427
}
428428

429429
public getRawHeight(responsive: boolean) {

0 commit comments

Comments
 (0)